diff --git a/apiserver/plane/api/serializers/workspace.py b/apiserver/plane/api/serializers/workspace.py index 4562726ae..078a4bf08 100644 --- a/apiserver/plane/api/serializers/workspace.py +++ b/apiserver/plane/api/serializers/workspace.py @@ -45,6 +45,7 @@ class WorkSpaceMemberSerializer(BaseSerializer): class WorkSpaceMemberInviteSerializer(BaseSerializer): workspace = WorkSpaceSerializer(read_only=True) total_members = serializers.IntegerField(read_only=True) + created_by_detail = UserLiteSerializer(read_only=True, source="created_by") class Meta: model = WorkspaceMemberInvite diff --git a/apiserver/plane/api/views/workspace.py b/apiserver/plane/api/views/workspace.py index e8e7160f4..58249d9b6 100644 --- a/apiserver/plane/api/views/workspace.py +++ b/apiserver/plane/api/views/workspace.py @@ -361,7 +361,7 @@ class WorkspaceInvitationsViewset(BaseViewSet): super() .get_queryset() .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() .get_queryset() .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")) )