fix: handoverb 校验
This commit is contained in:
parent
38ba04cc80
commit
ee7b7a526c
|
@ -592,7 +592,7 @@ class HandoverSerializer(CustomModelSerializer):
|
||||||
attrs['send_dept'] = wm.belong_dept
|
attrs['send_dept'] = wm.belong_dept
|
||||||
if handoverb[0]["wm"].mgroup:
|
if handoverb[0]["wm"].mgroup:
|
||||||
attrs['send_mgroup'] = 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('必须指定交接工段')
|
raise ValidationError('必须指定交接工段')
|
||||||
if 'recive_mgroup' in attrs and attrs['recive_mgroup']:
|
if 'recive_mgroup' in attrs and attrs['recive_mgroup']:
|
||||||
attrs['recive_dept'] = attrs['recive_mgroup'].belong_dept
|
attrs['recive_dept'] = attrs['recive_mgroup'].belong_dept
|
||||||
|
|
Loading…
Reference in New Issue