From c69c33e85a309484a2f3aa0415573b94991cdcbc Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 14 Aug 2025 08:44:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mlogbw=E6=B7=BB=E5=8A=A0=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E4=BB=A5=E6=94=AF=E6=8C=81=E7=9B=B4=E6=8E=A5=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/wpm/views.py b/apps/wpm/views.py index a47c6776..8c74f595 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -826,13 +826,13 @@ class MlogbwViewSet(CustomModelViewSet): serializer_class = MlogbwCreateUpdateSerializer filterset_class = MlogbwFilter select_related_fields = ["ftest", "equip", "wpr", "mlogb"] - ordering = ["number", "create_time"] - ordering_fields = ["number", "create_time"] + ordering = ["mlogb", "number", "create_time"] + ordering_fields = ["number", "create_time", "mlogb"] - def filter_queryset(self, queryset): - if not self.detail and not self.request.query_params.get('mlogb', None): - raise ParseError('请指定所属消耗/产出明细') - return super().filter_queryset(queryset) + # def filter_queryset(self, queryset): + # if not self.detail and not self.request.query_params.get('mlogb', None): + # raise ParseError('请指定所属消耗/产出明细') + # return super().filter_queryset(queryset) @transaction.atomic def perform_create(self, serializer):