fix: handoverserializer 关于new_wm的处理4

This commit is contained in:
caoqianming 2025-12-17 15:59:14 +08:00
parent 7fc995c7c9
commit 5dfb903c4a
1 changed files with 1 additions and 1 deletions

View File

@ -871,7 +871,7 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime,
elif handover.type == Handover.H_CHANGE:
if mtype == Handover.H_MERGE and handover.new_wm:
wm_to = handover.new_wm
if wm_to.material != handover.material_changed or wm_to.state != handover.state_changed or wm_to.defect != wm_from.defect:
if wm_to.material != handover.material_changed or wm_to.state != handover.state_changed:
raise ParseError("改版合并到的车间库存状态或物料异常")
elif handover.recive_mgroup:
wm_to, _ = WMaterial.objects.get_or_create(