forked from github/plane
chore: workspace invite created detail (#1209)
* chore: workspace invite created detail * dev: select related workspace member invite list
This commit is contained in:
parent
705371eaf3
commit
c127353281
@ -45,6 +45,7 @@ class WorkSpaceMemberSerializer(BaseSerializer):
|
|||||||
class WorkSpaceMemberInviteSerializer(BaseSerializer):
|
class WorkSpaceMemberInviteSerializer(BaseSerializer):
|
||||||
workspace = WorkSpaceSerializer(read_only=True)
|
workspace = WorkSpaceSerializer(read_only=True)
|
||||||
total_members = serializers.IntegerField(read_only=True)
|
total_members = serializers.IntegerField(read_only=True)
|
||||||
|
created_by_detail = UserLiteSerializer(read_only=True, source="created_by")
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = WorkspaceMemberInvite
|
model = WorkspaceMemberInvite
|
||||||
|
@ -361,7 +361,7 @@ class WorkspaceInvitationsViewset(BaseViewSet):
|
|||||||
super()
|
super()
|
||||||
.get_queryset()
|
.get_queryset()
|
||||||
.filter(workspace__slug=self.kwargs.get("slug"))
|
.filter(workspace__slug=self.kwargs.get("slug"))
|
||||||
.select_related("workspace", "workspace__owner")
|
.select_related("workspace", "workspace__owner", "created_by")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -374,7 +374,7 @@ class UserWorkspaceInvitationsEndpoint(BaseViewSet):
|
|||||||
super()
|
super()
|
||||||
.get_queryset()
|
.get_queryset()
|
||||||
.filter(email=self.request.user.email)
|
.filter(email=self.request.user.email)
|
||||||
.select_related("workspace", "workspace__owner")
|
.select_related("workspace", "workspace__owner", "created_by")
|
||||||
.annotate(total_members=Count("workspace__workspace_member"))
|
.annotate(total_members=Count("workspace__workspace_member"))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user