From ee7b7a526c17399494c203bddc8269264087c9f4 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 5 Sep 2024 16:38:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20handoverb=20=E6=A0=A1=E9=AA=8C?= 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 59914f5e..17144e96 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -592,7 +592,7 @@ class HandoverSerializer(CustomModelSerializer): attrs['send_dept'] = wm.belong_dept if handoverb[0]["wm"].mgroup: attrs['send_mgroup'] = handoverb[0]["wm"].mgroup - if material.process and material.process.into_wm_mgroup and 'recive_mgroup' not in attrs: + if attrs['material'].process and attrs['material'].process.into_wm_mgroup and 'recive_mgroup' not in attrs: raise ValidationError('必须指定交接工段') if 'recive_mgroup' in attrs and attrs['recive_mgroup']: attrs['recive_dept'] = attrs['recive_mgroup'].belong_dept