diff --git a/apiserver/plane/api/serializers/issue.py b/apiserver/plane/api/serializers/issue.py index 61958d89e..7aeee7d70 100644 --- a/apiserver/plane/api/serializers/issue.py +++ b/apiserver/plane/api/serializers/issue.py @@ -462,9 +462,9 @@ class IssueAttachmentSerializer(BaseSerializer): # Issue Serializer with state details class IssueStateSerializer(BaseSerializer): + label_details = LabelLiteSerializer(read_only=True, source="labels", many=True) state_detail = StateLiteSerializer(read_only=True, source="state") project_detail = ProjectLiteSerializer(read_only=True, source="project") - label_details = LabelSerializer(read_only=True, source="labels", many=True) assignee_details = UserLiteSerializer(read_only=True, source="assignees", many=True) sub_issues_count = serializers.IntegerField(read_only=True) bridge_id = serializers.UUIDField(read_only=True) diff --git a/apiserver/plane/api/views/workspace.py b/apiserver/plane/api/views/workspace.py index 4c136ed8c..305deb525 100644 --- a/apiserver/plane/api/views/workspace.py +++ b/apiserver/plane/api/views/workspace.py @@ -101,6 +101,7 @@ class WorkSpaceViewSet(BaseViewSet): .filter(workspace_member__member=self.request.user) .annotate(total_members=member_count) .annotate(total_issues=issue_count) + .select_related("owner") ) def create(self, request):