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']: