mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-30 01:22:18 +02:00
fix: eval fail message fix
This commit is contained in:
@@ -150,7 +150,7 @@ def validate_condition(pricing_rule, doc=None):
|
||||
doc = doc.as_dict()
|
||||
return frappe.safe_eval(pricing_rule.condition, None, doc)
|
||||
except Exception as e:
|
||||
frappe.throw(doc.name + " Pricing Rule 'Condition' field error:<br>" + str(e).capitalize() )
|
||||
frappe.throw(" Pricing Rule - " + pricing_rule.name + " - 'Condition' field error:<br>" + str(e).capitalize() )
|
||||
return False
|
||||
return True
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user