[Fix] Item variant details report (#13545)

This commit is contained in:
rohitwaghchaure 2018-04-06 11:49:04 +05:30 committed by Nabin Hait
parent 22d9f0a4aa
commit 2ae6cfda5f

View File

@ -40,7 +40,9 @@ def get_data(item):
name = item_dict["variant_name"]
for d in attribute_list:
item_dict[d] = attr_val_map[name][d]
attr_dict = attr_val_map[name]
if attr_dict and attr_dict.get(d):
item_dict[d] = attr_val_map[name][d]
item_dict["Open Orders"] = order_count_map.get(name) or 0