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)