From 38ba04cc8058a481798100dff945809743feb685 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 5 Sep 2024 15:52:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20handoverserializer=20mgroup=20=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index 509d47a9..59914f5e 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -590,8 +590,8 @@ class HandoverSerializer(CustomModelSerializer): attrs['material'] = wm.material attrs['batch'] = wm.batch attrs['send_dept'] = wm.belong_dept - if attrs['wm'].mgroup: - attrs['send_mgroup'] = wm.mgroup + 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: raise ValidationError('必须指定交接工段') if 'recive_mgroup' in attrs and attrs['recive_mgroup']: