fix: handoverserializer mgroup 处理
This commit is contained in:
parent
2ce99bc842
commit
38ba04cc80
|
@ -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']:
|
||||||
|
|
Loading…
Reference in New Issue