Skip to content

Commit

Permalink
fix: share why condition is wrong
Browse files Browse the repository at this point in the history
It's hard to figure out what's the problem without exception.
  • Loading branch information
ankush committed Oct 13, 2023
1 parent a7479f3 commit afebb7a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def validate_condition(self):
try:
temp_doc = frappe.new_doc(self.document_type)
frappe.safe_eval(self.condition, None, get_context(temp_doc))
except Exception:
frappe.throw(_("The Condition '{0}' is invalid").format(self.condition))
except Exception as e:
frappe.throw(_("The Condition '{0}' is invalid: {1}").format(self.condition, str(e)))

# What?
def get_hd_service_level_agreement_priority(self, priority):
Expand Down

0 comments on commit afebb7a

Please sign in to comment.