From 3fffd667dc94c360adc9e7aecfb9dca3aca13301 Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Wed, 27 Oct 2021 10:57:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E3=80=81=E5=B7=A5=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/api/system_user.py | 2 +- apps/tickets/api/ticket.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/assets/api/system_user.py b/apps/assets/api/system_user.py index 01baf000b..213858e13 100644 --- a/apps/assets/api/system_user.py +++ b/apps/assets/api/system_user.py @@ -41,7 +41,7 @@ class SystemUserViewSet(SuggestionMixin, OrgBulkModelViewSet): 'default': serializers.SystemUserSerializer, 'suggestion': serializers.MiniSystemUserSerializer } - ordering_fields = ('name', 'protocol') + ordering_fields = ('name', 'protocol', 'login_mode') ordering = ('name', ) permission_classes = (IsOrgAdminOrAppUser,) diff --git a/apps/tickets/api/ticket.py b/apps/tickets/api/ticket.py index 86d06f062..82fd8bd55 100644 --- a/apps/tickets/api/ticket.py +++ b/apps/tickets/api/ticket.py @@ -29,7 +29,7 @@ class TicketViewSet(CommonApiMixin, viewsets.ModelViewSet): search_fields = [ 'title', 'action', 'type', 'status', 'applicant_display' ] - ordering_fields = ('title',) + ordering_fields = ('title', 'applicant_display', 'status', 'state', 'action_display', 'date_created') ordering = ('title', ) def create(self, request, *args, **kwargs):