feat: enstat提供排序条件2

This commit is contained in:
caoqianming 2024-12-06 13:25:36 +08:00
parent 3ba0ddaaa9
commit 438406842d
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ class EnStatViewSet(CustomListModelMixin, CustomGenericViewSet):
select_related_fields = ["mgroup", "team", "mgroup__belong_dept"]
filterset_class = EnStatFilter
ordering = ["mgroup__sort", "year_s", "month_s", "day_s", "hour"]
ordering_fields = ["mgroup__sort", "year_s", "month_s", "day_s", "hour"]
ordering_fields = ["mgroup__sort", "year_s", "month_s", "day_s", "hour", "update_time"]
@action(methods=["post"], detail=False, perms_map={"post": "*"}, serializer_class=EnStatAnaSerializer)
def analyze(self, request, *args, **kwargs):