From e4178849ba08982506e8988ca6696756a2bf1b5f Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Wed, 15 Dec 2021 14:23:07 +0800 Subject: [PATCH] perf: ticket filter --- apps/tickets/filters.py | 2 +- apps/tickets/handler/base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/tickets/filters.py b/apps/tickets/filters.py index 676efbea2..3c795f0df 100644 --- a/apps/tickets/filters.py +++ b/apps/tickets/filters.py @@ -10,7 +10,7 @@ class TicketFilter(BaseFilterSet): class Meta: model = Ticket fields = ( - 'id', 'title', 'type', 'status', 'applicant', 'assignees__id', + 'id', 'title', 'type', 'status', 'state', 'applicant', 'assignees__id', 'applicant_display', ) diff --git a/apps/tickets/handler/base.py b/apps/tickets/handler/base.py index 5e13b7a60..4b09531fa 100644 --- a/apps/tickets/handler/base.py +++ b/apps/tickets/handler/base.py @@ -29,9 +29,9 @@ class BaseHandler(object): self._send_applied_mail_to_assignees() is_finished = False else: - self._send_processed_mail_to_applicant(self.ticket.processor) self.ticket.set_state_approve() self.ticket.set_status_closed() + self._send_processed_mail_to_applicant(self.ticket.processor) is_finished = True self.ticket.save()