fix: handover_submit batches获取bug
This commit is contained in:
parent
9ede95a5d6
commit
265a15c9fc
|
@ -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")
|
BatchLog.g_create(source=source, target=target_b, handover=handover, relation_type="merge")
|
||||||
elif mtype == Handover.H_DIV:
|
elif mtype == Handover.H_DIV:
|
||||||
batch = handover_or_b.batch
|
batch = handover_or_b.batch
|
||||||
|
batches.append(batch)
|
||||||
if batch in batches_to_limit:
|
if batch in batches_to_limit:
|
||||||
raise ParseError(f'{batch} 不在可拆批次中')
|
raise ParseError(f'{batch} 不在可拆批次中')
|
||||||
else:
|
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")
|
BatchLog.g_create(source=source_b, target=target, handover=handover, relation_type="split")
|
||||||
else:
|
else:
|
||||||
batch = wm_from.batch
|
batch = wm_from.batch
|
||||||
batches.append(batch)
|
batches.append(batch)
|
||||||
|
|
||||||
if wm_from is None:
|
if wm_from is None:
|
||||||
raise ParseError(f'{wm_from.batch} 找不到车间库存')
|
raise ParseError(f'{wm_from.batch} 找不到车间库存')
|
||||||
|
|
Loading…
Reference in New Issue