Browse Source

fix: 修改系统用户、工单列表排序字段

pull/7089/head
Michael Bai 3 years ago committed by Jiangjie.Bai
parent
commit
3fffd667dc
  1. 2
      apps/assets/api/system_user.py
  2. 2
      apps/tickets/api/ticket.py

2
apps/assets/api/system_user.py

@ -41,7 +41,7 @@ class SystemUserViewSet(SuggestionMixin, OrgBulkModelViewSet):
'default': serializers.SystemUserSerializer, 'default': serializers.SystemUserSerializer,
'suggestion': serializers.MiniSystemUserSerializer 'suggestion': serializers.MiniSystemUserSerializer
} }
ordering_fields = ('name', 'protocol') ordering_fields = ('name', 'protocol', 'login_mode')
ordering = ('name', ) ordering = ('name', )
permission_classes = (IsOrgAdminOrAppUser,) permission_classes = (IsOrgAdminOrAppUser,)

2
apps/tickets/api/ticket.py

@ -29,7 +29,7 @@ class TicketViewSet(CommonApiMixin, viewsets.ModelViewSet):
search_fields = [ search_fields = [
'title', 'action', 'type', 'status', 'applicant_display' 'title', 'action', 'type', 'status', 'applicant_display'
] ]
ordering_fields = ('title',) ordering_fields = ('title', 'applicant_display', 'status', 'state', 'action_display', 'date_created')
ordering = ('title', ) ordering = ('title', )
def create(self, request, *args, **kwargs): def create(self, request, *args, **kwargs):

Loading…
Cancel
Save