mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: issue serializer
This commit is contained in:
parent
49fc8caf5a
commit
3325a28921
@ -384,7 +384,7 @@ class IssueSerializer(BaseSerializer):
|
||||
blocked_issues = BlockedIssueSerializer(read_only=True, many=True)
|
||||
blocker_issues = BlockerIssueSerializer(read_only=True, many=True)
|
||||
issue_cycle = IssueCycleDetailSerializer(read_only=True)
|
||||
issue_module = IssueModuleDetailSerializer(read_only=True)
|
||||
issue_module = IssueModuleDetailSerializer(read_only=True, many=True)
|
||||
|
||||
class Meta:
|
||||
model = Issue
|
||||
|
@ -37,6 +37,7 @@ from plane.db.models import (
|
||||
Label,
|
||||
IssueBlocker,
|
||||
CycleIssue,
|
||||
ModuleIssue
|
||||
)
|
||||
|
||||
|
||||
@ -96,6 +97,12 @@ class IssueViewSet(BaseViewSet):
|
||||
queryset=CycleIssue.objects.select_related("cycle", "issue"),
|
||||
),
|
||||
)
|
||||
.prefetch_related(
|
||||
Prefetch(
|
||||
"issue_module",
|
||||
queryset=ModuleIssue.objects.select_related("module", "issue"),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
def grouper(self, issue, group_by):
|
||||
@ -175,6 +182,7 @@ class UserWorkSpaceIssues(BaseAPIView):
|
||||
status=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
)
|
||||
|
||||
|
||||
class WorkSpaceIssuesEndpoint(BaseAPIView):
|
||||
|
||||
permission_classes = [
|
||||
|
Loading…
Reference in New Issue
Block a user