diff --git a/apps/enp/views.py b/apps/enp/views.py index 593b24d0..e6f30af0 100644 --- a/apps/enp/views.py +++ b/apps/enp/views.py @@ -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)