diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 7bb9a5d5..27ea58fa 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -857,7 +857,9 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime, else: raise ParseError("不支持非工段报废") elif handover.type == Handover.H_CHANGE: - if handover.recive_mgroup: + if handover.new_wm: + wm_to = handover.new_wm + elif handover.recive_mgroup: wm_to, _ = WMaterial.objects.get_or_create( batch=batch, material=handover.material_changed,