fix: handoverserializer mgroup 处理

This commit is contained in:
caoqianming 2024-09-05 15:52:22 +08:00
parent 2ce99bc842
commit 38ba04cc80
1 changed files with 2 additions and 2 deletions

View File

@ -590,8 +590,8 @@ class HandoverSerializer(CustomModelSerializer):
attrs['material'] = wm.material attrs['material'] = wm.material
attrs['batch'] = wm.batch attrs['batch'] = wm.batch
attrs['send_dept'] = wm.belong_dept attrs['send_dept'] = wm.belong_dept
if attrs['wm'].mgroup: if handoverb[0]["wm"].mgroup:
attrs['send_mgroup'] = 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 material.process and material.process.into_wm_mgroup and 'recive_mgroup' not in attrs:
raise ValidationError('必须指定交接工段') raise ValidationError('必须指定交接工段')
if 'recive_mgroup' in attrs and attrs['recive_mgroup']: if 'recive_mgroup' in attrs and attrs['recive_mgroup']: