From 265a15c9fce1ffe74545e7925b173690c8bbe34e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 4 Jun 2025 15:23:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20handover=5Fsubmit=20batches=E8=8E=B7?= =?UTF-8?q?=E5=8F=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 9b0f3dc2..0f694c4b 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -771,6 +771,7 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime, BatchLog.g_create(source=source, target=target_b, handover=handover, relation_type="merge") elif mtype == Handover.H_DIV: batch = handover_or_b.batch + batches.append(batch) if batch in batches_to_limit: raise ParseError(f'{batch} 不在可拆批次中') else: @@ -780,7 +781,7 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime, BatchLog.g_create(source=source_b, target=target, handover=handover, relation_type="split") else: batch = wm_from.batch - batches.append(batch) + batches.append(batch) if wm_from is None: raise ParseError(f'{wm_from.batch} 找不到车间库存')