From 65726e967f3454a8d5b797ab23c7cd18d4c51aa1 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 4 Sep 2025 16:48:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20update=5Fmb=5Fitem=20defect=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=9B=B4=E4=B8=A5=E8=B0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/inm/services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/inm/services.py b/apps/inm/services.py index 145f9568..67d47bc4 100644 --- a/apps/inm/services.py +++ b/apps/inm/services.py @@ -398,7 +398,7 @@ class InmService: if change_count < 0: raise ParseError("存在负数!") state = WMaterial.WM_OK - if defect: + if defect and defect.okcate in [Defect.DEFECT_NOTOK]: state = WMaterial.WM_NOTOK mb, _ = MaterialBatch.objects.get_or_create( material=material,