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
This commit is contained in:
sahil28297
2019-11-11 11:15:29 +05:30
committed by Nabin Hait
parent d2dc889849
commit 5a0a4bdcff

View File

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