Skip to content

Commit

Permalink
Merge pull request #2027 from StephanH90/fix/catch-jexl-evaluation-error
Browse files Browse the repository at this point in the history
fix: catch ValueError and ZeroDivision errors on early jexl evaluation
  • Loading branch information
StephanH90 authored Jul 17, 2023
2 parents b035c33 + 0fe96ea commit f19ebbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caluma/caluma_form/jexl.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def is_required(self, field: Field):
def evaluate(self, expr, raise_on_error=True):
try:
return super().evaluate(expr)
except TypeError:
except (TypeError, ValueError, ZeroDivisionError):
if raise_on_error:
raise
return None

0 comments on commit f19ebbb

Please sign in to comment.