fix: update_mb_item时考虑检验的存在
This commit is contained in:
parent
c35041f72b
commit
0c5034683c
|
|
@ -373,7 +373,10 @@ class InmService:
|
||||||
ddict["material_ofrom"] = i.material
|
ddict["material_ofrom"] = i.material
|
||||||
|
|
||||||
if field == "count":
|
if field == "count":
|
||||||
|
if i.test_date is not None:
|
||||||
count_change = i.count - i.count_notok
|
count_change = i.count - i.count_notok
|
||||||
|
else:
|
||||||
|
count_change = i.count
|
||||||
elif field == "count_notok":
|
elif field == "count_notok":
|
||||||
count_change = getattr(i, field)
|
count_change = getattr(i, field)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue