fix: use name instead of title

This commit is contained in:
Poranut Chollavorn
2020-06-22 10:24:40 +00:00
parent 850c0ff121
commit 303639db76

View File

@@ -37,11 +37,11 @@ def get_pricing_rules(args, doc=None):
pricing_rules_all.extend(_get_pricing_rules(apply_on, args, values))
# removing duplicate pricing rule
pricing_rules_title = []
pricing_rules_name = []
pricing_rules = []
for p in pricing_rules_all:
if p['title'] not in pricing_rules_title:
pricing_rules_title.append(p['title'])
if p['name'] not in pricing_rules_name:
pricing_rules_name.append(p['name'])
pricing_rules.append(p)
rules = []