fix: do_in bug
This commit is contained in:
parent
a00f533752
commit
6006d42f9d
|
@ -147,7 +147,7 @@ def do_in(item: MIOItem):
|
||||||
raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不属于同一车间')
|
raise ParseError(f'{str(xmaterial)}-{xbatch}车间物料不属于同一车间')
|
||||||
# 增加mb
|
# 增加mb
|
||||||
if not is_zhj:
|
if not is_zhj:
|
||||||
mb, _ = MaterialBatch.objects.get(
|
mb, _ = MaterialBatch.objects.get_or_create(
|
||||||
material=xmaterial,
|
material=xmaterial,
|
||||||
warehouse=item.warehouse,
|
warehouse=item.warehouse,
|
||||||
batch=xbatch,
|
batch=xbatch,
|
||||||
|
@ -163,7 +163,7 @@ def do_in(item: MIOItem):
|
||||||
|
|
||||||
|
|
||||||
if is_zhj: # 组合件单独处理
|
if is_zhj: # 组合件单独处理
|
||||||
mb, is_created = MaterialBatch.objects.get(
|
mb, is_created = MaterialBatch.objects.get_or_create(
|
||||||
material=item.material,
|
material=item.material,
|
||||||
warehouse=item.warehouse,
|
warehouse=item.warehouse,
|
||||||
batch=item.batch,
|
batch=item.batch,
|
||||||
|
|
Loading…
Reference in New Issue