From 5a0a4bdcff9253c095275536e310dd906a2329ee Mon Sep 17 00:00:00 2001 From: sahil28297 <37302950+sahil28297@users.noreply.github.com> Date: Mon, 11 Nov 2019 11:15:29 +0530 Subject: [PATCH] fix(cart): return rule instead of rule_label_map (#19521) * fix(cart): return rule instead of rule_label_map * fix(cart): remove get_value for rule_label_map as well --- erpnext/shopping_cart/cart.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index a9861e83c16..c1ae739365f 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -454,9 +454,8 @@ def get_applicable_shipping_rules(party=None, quotation=None): shipping_rules = get_shipping_rules(quotation) if shipping_rules: - rule_label_map = frappe.db.get_values("Shipping Rule", shipping_rules, "label") # we need this in sorted order as per the position of the rule in the settings page - return [[rule, rule_label_map.get(rule)] for rule in shipping_rules] + return [[rule, rule] for rule in shipping_rules] def get_shipping_rules(quotation=None, cart_settings=None): if not quotation: