mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 16:19:43 +01:00
chore: draft issue listing (#5874)
This commit is contained in:
committed by
GitHub
parent
db919420a7
commit
3c3fc7cd6d
@@ -404,11 +404,7 @@ class CycleAPIEndpoint(BaseAPIView):
|
||||
epoch=int(timezone.now().timestamp()),
|
||||
)
|
||||
# Delete the cycle
|
||||
cycle.delete()
|
||||
# Delete the cycle issues
|
||||
CycleIssue.objects.filter(
|
||||
cycle_id=self.kwargs.get("pk"),
|
||||
).delete()
|
||||
cycle.delete(soft=False)
|
||||
# Delete the user favorite cycle
|
||||
UserFavorite.objects.filter(
|
||||
entity_type="cycle",
|
||||
|
||||
@@ -490,12 +490,9 @@ class CycleViewSet(BaseViewSet):
|
||||
notification=True,
|
||||
origin=request.META.get("HTTP_ORIGIN"),
|
||||
)
|
||||
# Delete the cycle
|
||||
cycle.delete()
|
||||
# Delete the cycle issues
|
||||
CycleIssue.objects.filter(
|
||||
cycle_id=self.kwargs.get("pk"),
|
||||
).delete()
|
||||
# TODO: Soft delete the cycle break the onetoone relationship with cycle issue
|
||||
cycle.delete(soft=False)
|
||||
|
||||
# Delete the user favorite cycle
|
||||
UserFavorite.objects.filter(
|
||||
user=request.user,
|
||||
|
||||
@@ -60,8 +60,8 @@ class WorkspaceDraftIssueViewSet(BaseViewSet):
|
||||
.annotate(
|
||||
cycle_id=Case(
|
||||
When(
|
||||
issue_cycle__cycle__deleted_at__isnull=True,
|
||||
then=F("issue_cycle__cycle_id"),
|
||||
draft_issue_cycle__cycle__deleted_at__isnull=True,
|
||||
then=F("draft_issue_cycle__cycle_id"),
|
||||
),
|
||||
default=None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user