fix: filter out soft-deleted states from API endpoints (#8840)
* fix: filter out soft-deleted states from API endpoints - Add deleted_at__isnull=True filter to StateListCreateAPIEndpoint.get_queryset() - Add deleted_at__isnull=True filter to StateDetailAPIEndpoint.get_queryset() - Prevents soft-deleted states from reappearing in UI after navigation - Fixes #8829 * Fix: exclude issues linked to soft-deleted states
This commit is contained in:
parent
a40e064448
commit
db1c5b9513
1 changed files with 2 additions and 1 deletions
|
|
@ -99,6 +99,7 @@ class IssueListEndpoint(BaseAPIView):
|
|||
# Apply legacy filters
|
||||
filters = issue_filters(request.query_params, "GET")
|
||||
issue_queryset = queryset.filter(**filters)
|
||||
issue_queryset = issue_queryset.filter(state__deleted_at__isnull=True)
|
||||
|
||||
# Add select_related, prefetch_related if fields or expand is not None
|
||||
if self.fields or self.expand:
|
||||
|
|
@ -157,7 +158,7 @@ class IssueListEndpoint(BaseAPIView):
|
|||
)
|
||||
|
||||
if self.fields or self.expand:
|
||||
issues = IssueSerializer(queryset, many=True, fields=self.fields, expand=self.expand).data
|
||||
issues = IssueSerializer(issue_queryset, many=True, fields=self.fields, expand=self.expand).data
|
||||
else:
|
||||
issues = issue_queryset.values(
|
||||
"id",
|
||||
|
|
|
|||
Loading…
Reference in a new issue