From 6a734ecd34e45a3c096d5e590ad1d33c441ba400 Mon Sep 17 00:00:00 2001 From: Prssanna Desai Date: Mon, 2 Mar 2020 18:06:21 +0530 Subject: [PATCH] fix: use get all instead of get list to fetch item attributes (#20793) --- erpnext/portal/product_configurator/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/portal/product_configurator/utils.py b/erpnext/portal/product_configurator/utils.py index ce507a39486..327a128068f 100644 --- a/erpnext/portal/product_configurator/utils.py +++ b/erpnext/portal/product_configurator/utils.py @@ -188,7 +188,9 @@ def get_attributes_and_values(item_code): def get_numeric_values(): attribute_values_list = [] - numeric_attributes = frappe.get_list("Item Attribute", fields=['name', 'from_range', 'to_range', 'increment'], filters={"numeric_values": 1}) + numeric_attributes = frappe.db.get_all("Item Attribute", + fields=['name', 'from_range', 'to_range', 'increment'], + filters={"numeric_values": 1}) for attribute in numeric_attributes: from_range = attribute["from_range"] to_range = attribute['to_range'] + attribute['increment']