Revert "fix: fail silently"

This reverts commit 6900a79421b141e9d86d7e111ba9eac06e7cf75d.
This commit is contained in:
barredterra 2020-12-22 11:43:33 +01:00
parent a69021018a
commit 511be6466d

View File

@ -37,14 +37,7 @@ def validate_regional(doc):
for field in required_fields:
condition = field.get("condition")
condition_true = True
try:
condition_true = frappe.safe_eval(condition, doc.as_dict())
except:
# invalid condition should not result in an error
pass
if condition and not condition_true:
if condition and not frappe.safe_eval(condition, doc.as_dict()):
continue
field_name = field.get("field_name")