[WEB-2092] chore: changed the hard delete days (#5255)

* chore: changed the hard delete days

* chore: hard delete key change

* chore: restrict deletion of project

* chore: draft issue delete filter
This commit is contained in:
Bavisetti Narayan 2024-07-30 20:05:08 +05:30 committed by GitHub
parent 0b01d3e88d
commit 3c684ecab7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 32 additions and 22 deletions

View file

@ -66,6 +66,7 @@ class IssueArchiveViewSet(BaseViewSet):
.annotate(count=Func(F("id"), function="Count"))
.values("count")
)
.filter(deleted_at__isnull=True)
.filter(archived_at__isnull=False)
.filter(project_id=self.kwargs.get("project_id"))
.filter(workspace__slug=self.kwargs.get("slug"))

View file

@ -68,6 +68,7 @@ class IssueDraftViewSet(BaseViewSet):
Issue.objects.filter(project_id=self.kwargs.get("project_id"))
.filter(workspace__slug=self.kwargs.get("slug"))
.filter(is_draft=True)
.filter(deleted_at__isnull=True)
.select_related("workspace", "project", "state", "parent")
.prefetch_related("assignees", "labels", "issue_module__module")
.annotate(cycle_id=F("issue_cycle__cycle_id"))