打卡排序/许可证排序
This commit is contained in:
parent
64a331a825
commit
7f1e6f0c56
|
@ -226,7 +226,7 @@ class ClockRecordViewSet(ListModelMixin, CustomGenericViewSet):
|
|||
search_fields = ['employee__name', 'employee__number', 'employee__phone']
|
||||
serializer_class = ClockRecordListSerializer
|
||||
filterset_class = ClockRecordFilterSet
|
||||
ordering = ['-pk']
|
||||
ordering = ['-create_time']
|
||||
|
||||
@action(methods=['get'], detail=False, perms_map={'get': '*'},
|
||||
serializer_class=serializers.Serializer)
|
||||
|
|
|
@ -19,12 +19,13 @@ from django.core.cache import cache
|
|||
|
||||
|
||||
class OplCateViewSet(CustomModelViewSet):
|
||||
queryset = OplCate.objects.all().order_by('sort')
|
||||
queryset = OplCate.objects.all()
|
||||
create_serializer_class = OplCateCreateUpdateSerializer
|
||||
update_serializer_class = OplCateCreateUpdateSerializer
|
||||
retrieve_serializer_class = OplCateDetailSerializer
|
||||
serializer_class = OplCateSerializer
|
||||
prefetch_related_fields = ['measure_options', 'risk_options', 'close_options']
|
||||
ordering = 'sort'
|
||||
|
||||
|
||||
class OperationViewSet(CustomModelViewSet):
|
||||
|
|
Loading…
Reference in New Issue