fix: getattr(item, field) is not None
This commit is contained in:
parent
ac610a53ce
commit
f35d2d7d9e
|
@ -323,7 +323,7 @@ def get_alldata_with_batch(batch: str):
|
|||
data["六车间生产入库_检验日期"].append(item.test_date)
|
||||
|
||||
for field in mioitem_count_fields:
|
||||
if getattr(item, field) > 0:
|
||||
if getattr(item, field) is not None and getattr(item, field) > 0:
|
||||
if f'六车间生产入库_{field}' not in data:
|
||||
data[f'六车间生产入库_{field}'] = getattr(item, field)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue