fix: getattr(item, field) is not None

This commit is contained in:
caoqianming 2025-04-29 15:14:02 +08:00
parent d6504fa072
commit 283c566b71
1 changed files with 1 additions and 1 deletions

View File

@ -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: