diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 3b1c8740..553440a7 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -885,6 +885,8 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime, else: raise ParseError("改版交接必须指定接收工段") elif handover.type == Handover.H_BACK: + if wm_from and wm_from.state != WMaterial.WM_OK: + raise ParseError("仅合格品支持退回") if mtype == Handover.H_MERGE and handover.new_wm: wm_to = handover.new_wm else: