From 0473be4d3043c20834d77781f0d69040a4252caa Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 30 May 2024 10:55:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A3=80=E9=AA=8C=E6=92=A4=E5=9B=9Etes?= =?UTF-8?q?t=5Fdate=E5=9C=A8count=5Fnotok=E6=97=B6=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E7=BD=AE=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/inm/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/inm/views.py b/apps/inm/views.py index e8ca6026..e9a210b4 100644 --- a/apps/inm/views.py +++ b/apps/inm/views.py @@ -268,8 +268,10 @@ class MIOItemViewSet(ListModelMixin, BulkCreateModelMixin, BulkDestroyModelMixin raise ParseError('该明细还未检验') if ins.count_notok > 0: InmService.update_mb_item(ins, 1, 'count_notok', mio.type, mio.belong_dept) - ins.test_date = None - ins.save() + elif ins.count_notok == 0: + pass + ins.test_date = None + ins.save() return Response() @action(methods=['post'], detail=True, perms_map={'post': 'mioitem.test'}, serializer_class=MIOItemPurInTestSerializer)