From 0c25ee75f311a1345d584b7f004cd235682ca3de Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 31 Oct 2025 11:09:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20wpr=20change=5For=5Fnew=20wpr=5Ffrom=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpmw/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/wpmw/models.py b/apps/wpmw/models.py index 70827eb1..af092087 100644 --- a/apps/wpmw/models.py +++ b/apps/wpmw/models.py @@ -92,8 +92,9 @@ class Wpr(BaseModel): raise ParseError(f"请检查-{ins.number}-所属仓库批次") if old_wm and ins.wm != old_wm: raise ParseError(f"请检查-{ins.number}-所属车间批次") - - ins.wpr_from = wpr_from + + if wpr_from: + ins.wpr_from = wpr_from ins.mb = mb if mb: ins.material = mb.material