From ff9177a6ceb4930c5e4bba86a2c89b827d242c3e Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 6 May 2019 15:59:51 +0530 Subject: [PATCH] fix: Handle attribute filter when no items found --- erpnext/portal/product_configurator/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/portal/product_configurator/utils.py b/erpnext/portal/product_configurator/utils.py index 405a6d8c31..15d5e9fa0d 100644 --- a/erpnext/portal/product_configurator/utils.py +++ b/erpnext/portal/product_configurator/utils.py @@ -257,7 +257,8 @@ def get_items_with_selected_attributes(item_code, selected_attributes): items = [] for attribute, value in selected_attributes.items(): - items.append(set(attribute_value_item_map[(attribute, value)])) + filtered_items = attribute_value_item_map.get((attribute, value), []) + items.append(set(filtered_items)) return set.intersection(*items)