forked from github/plane
chore: total members in user workspace invites (#1143)
This commit is contained in:
parent
bc8430220b
commit
c9dee593eb
@ -44,6 +44,7 @@ class WorkSpaceMemberSerializer(BaseSerializer):
|
||||
|
||||
class WorkSpaceMemberInviteSerializer(BaseSerializer):
|
||||
workspace = WorkSpaceSerializer(read_only=True)
|
||||
total_members = serializers.IntegerField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = WorkspaceMemberInvite
|
||||
|
@ -375,6 +375,7 @@ class UserWorkspaceInvitationsEndpoint(BaseViewSet):
|
||||
.get_queryset()
|
||||
.filter(email=self.request.user.email)
|
||||
.select_related("workspace", "workspace__owner")
|
||||
.annotate(total_members=Count("workspace__workspace_member"))
|
||||
)
|
||||
|
||||
def create(self, request):
|
||||
|
Loading…
Reference in New Issue
Block a user