From d9031ae02bdd64e8c617ea1a41ea5ca97e88f23d Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Mon, 9 Dec 2024 16:54:36 +0800 Subject: [PATCH] perf: Ticket filter assignee_id --- apps/tickets/filters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/tickets/filters.py b/apps/tickets/filters.py index dcba10036..edfba460d 100644 --- a/apps/tickets/filters.py +++ b/apps/tickets/filters.py @@ -23,7 +23,8 @@ class TicketFilter(BaseFilterSet): def filter_assignees_id(self, queryset, name, value): return queryset.filter( - ticket_steps__ticket_assignees__assignee__id=value + ticket_steps__level=F('approval_step'), + ticket_steps__ticket_assignees__assignee_id=value ) def filter_relevant_asset(self, queryset, name, value):