chore: filter out the removed cycle from issue detail (#6138)
This commit is contained in:
parent
fe43300aa7
commit
b6ab853c57
1 changed files with 4 additions and 6 deletions
|
|
@ -445,12 +445,10 @@ class IssueViewSet(BaseViewSet):
|
|||
.select_related("workspace", "project", "state", "parent")
|
||||
.prefetch_related("assignees", "labels", "issue_module__module")
|
||||
.annotate(
|
||||
cycle_id=Case(
|
||||
When(
|
||||
issue_cycle__cycle__deleted_at__isnull=True,
|
||||
then=F("issue_cycle__cycle_id"),
|
||||
),
|
||||
default=None,
|
||||
cycle_id=Subquery(
|
||||
CycleIssue.objects.filter(issue=OuterRef("id")).values("cycle_id")[
|
||||
:1
|
||||
]
|
||||
)
|
||||
)
|
||||
.annotate(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue