Skip to content

Commit 3241693

Browse files
[WEB-5815] chore: removed the deleted states (#8457)
1 parent 6cc5c19 commit 3241693

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

apps/api/plane/db/models/issue.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ def get_queryset(self):
9090
return (
9191
super()
9292
.get_queryset()
93-
.filter(
94-
models.Q(issue_intake__status=1)
95-
| models.Q(issue_intake__status=-1)
96-
| models.Q(issue_intake__status=2)
97-
| models.Q(issue_intake__isnull=True)
98-
)
99-
.filter(deleted_at__isnull=True)
100-
.filter(state__is_triage=False)
10193
.exclude(state__group=StateGroup.TRIAGE.value)
10294
.exclude(archived_at__isnull=False)
10395
.exclude(project__archived_at__isnull=False)

apps/api/plane/db/models/state.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Module imports
77
from .project import ProjectBaseModel
8-
8+
from plane.db.mixins import SoftDeletionManager
99

1010
class StateGroup(models.TextChoices):
1111
BACKLOG = "backlog", "Backlog"
@@ -58,14 +58,14 @@ class StateGroup(models.TextChoices):
5858
]
5959

6060

61-
class StateManager(models.Manager):
61+
class StateManager(SoftDeletionManager):
6262
"""Default manager - excludes triage states"""
6363

6464
def get_queryset(self):
6565
return super().get_queryset().exclude(group=StateGroup.TRIAGE.value)
6666

6767

68-
class TriageStateManager(models.Manager):
68+
class TriageStateManager(SoftDeletionManager):
6969
"""Manager for triage states only"""
7070

7171
def get_queryset(self):

0 commit comments

Comments
 (0)