Skip to content

Commit f19ebbb

Browse files
authored
Merge pull request projectcaluma#2027 from StephanH90/fix/catch-jexl-evaluation-error
fix: catch ValueError and ZeroDivision errors on early jexl evaluation
2 parents b035c33 + 0fe96ea commit f19ebbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

caluma/caluma_form/jexl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def is_required(self, field: Field):
201201
def evaluate(self, expr, raise_on_error=True):
202202
try:
203203
return super().evaluate(expr)
204-
except TypeError:
204+
except (TypeError, ValueError, ZeroDivisionError):
205205
if raise_on_error:
206206
raise
207207
return None

0 commit comments

Comments
 (0)