From c03129ae814a8fd9add84406e2959b216e837ffb Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 10 Jan 2025 09:40:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Handover=E6=AD=A3=E5=B8=B8=E4=BA=A4?= =?UTF-8?q?=E6=8E=A5=E4=B8=8D=E6=94=AF=E6=8C=81=E4=B8=8D=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index 19d89728..07edf5c6 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -747,7 +747,7 @@ class HandoverSerializer(CustomModelSerializer): # raise ParseError(f'第{ind+1}物料与交接部门不一致') if attrs["material"] != wm.material: raise ParseError(f'第{ind+1}物料与交接物料不一致') - if wm.notok_sign is not None and attrs['type'] in [Handover.H_NORMAL, Handover.H_TEST]: + if (wm.notok_sign or wm.defect) and attrs['type'] in [Handover.H_NORMAL, Handover.H_TEST]: raise ParseError(f'第{ind+1}物料不合格,不能进行正常/检验交接') if wm.count_xtest is not None: raise ParseError(f'第{ind+1}物料检验中,不能进行交接')