mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
fix: dont show message on condition syntax error
This commit is contained in:
@@ -61,9 +61,8 @@ def filter_pricing_rule_based_on_condition(pricing_rules, doc=None):
|
|||||||
try:
|
try:
|
||||||
if frappe.safe_eval(pricing_rule.condition, None, doc.as_dict()):
|
if frappe.safe_eval(pricing_rule.condition, None, doc.as_dict()):
|
||||||
filtered_pricing_rules.append(pricing_rule)
|
filtered_pricing_rules.append(pricing_rule)
|
||||||
except Exception as e:
|
except:
|
||||||
frappe.msgprint(_("Pricing Rule - " + pricing_rule.name + " - <b>condition</b> field error:<br>" + \
|
pass
|
||||||
str(e).capitalize() + "<br><br>Ignoring Pricing Rule"), indicator="orange", title=_("Warning"))
|
|
||||||
else:
|
else:
|
||||||
filtered_pricing_rules.append(pricing_rule)
|
filtered_pricing_rules.append(pricing_rule)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user