fix: update_mb_item时考虑检验的存在

This commit is contained in:
caoqianming 2025-12-17 09:25:44 +08:00
parent c35041f72b
commit 0c5034683c
1 changed files with 4 additions and 1 deletions

View File

@ -373,7 +373,10 @@ class InmService:
ddict["material_ofrom"] = i.material
if field == "count":
count_change = i.count - i.count_notok
if i.test_date is not None:
count_change = i.count - i.count_notok
else:
count_change = i.count
elif field == "count_notok":
count_change = getattr(i, field)
else: