fix: 工单序号添加排序

pull/7496/head
xinwen 2022-01-13 11:42:53 +08:00 committed by 老广
parent 620834c817
commit 43c4c78378
1 changed files with 4 additions and 1 deletions

View File

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