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