mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00: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()
|
doc = doc.as_dict()
|
||||||
return frappe.safe_eval(pricing_rule.condition, None, doc)
|
return frappe.safe_eval(pricing_rule.condition, None, doc)
|
||||||
except Exception as e:
|
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 False
|
||||||
return True
|
return True
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user