fix: mb create加锁

This commit is contained in:
caoqianming 2025-02-21 17:05:50 +08:00
parent 07473ddf90
commit a1525d1289
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ class InmService:
state = WMaterial.WM_OK
if defect:
state = WMaterial.WM_NOTOK
mb, _ = MaterialBatch.objects.get_or_create(
mb, _ = MaterialBatch.safe_get_or_create(
material=material,
warehouse=warehouse,
batch=batch,