fix:Pricing Rule error AttributeError: 'str' object has no attribute 'get' #19770
This commit is contained in:
parent
514e925a10
commit
db8911b05d
@ -33,7 +33,6 @@ class PricingRule(Document):
|
|||||||
if not self.margin_type: self.margin_rate_or_amount = 0.0
|
if not self.margin_type: self.margin_rate_or_amount = 0.0
|
||||||
|
|
||||||
def validate_duplicate_apply_on(self):
|
def validate_duplicate_apply_on(self):
|
||||||
print("##############",self.apply_on)
|
|
||||||
field = apply_on_dict.get(self.apply_on)
|
field = apply_on_dict.get(self.apply_on)
|
||||||
values = [d.get(frappe.scrub(self.apply_on)) for d in self.get(field) if field]
|
values = [d.get(frappe.scrub(self.apply_on)) for d in self.get(field) if field]
|
||||||
if len(values) != len(set(values)):
|
if len(values) != len(set(values)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user