Skip to content

Commit

Permalink
fix: also catch ValueError and ZeroDivision errors on early jexl eval…
Browse files Browse the repository at this point in the history
…uation
  • Loading branch information
StephanH90 committed Jul 4, 2023
1 parent 7125c6a commit 0fe96ea
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 0fe96ea

Please sign in to comment.