fix: envdata因未配置ordering触发bug
This commit is contained in:
parent
1b6c58e7c8
commit
820f316511
|
@ -121,6 +121,8 @@ class EnvDataViewSet(ListModelMixin, CustomGenericViewSet):
|
|||
"time": ['exact', 'gte', 'lte', 'year', 'month', 'day'],
|
||||
"equipment": ['exact'],
|
||||
}
|
||||
ordering_fields = ['time']
|
||||
ordering = ['-time']
|
||||
|
||||
@action(methods=['post'], detail=False, perms_map={'post': '*'},
|
||||
serializer_class=EnvDataExportSerializer)
|
||||
|
|
Loading…
Reference in New Issue