Skip to content
Snippets Groups Projects
Commit e584858c authored by Felix Blanke's avatar Felix Blanke
Browse files

Add exception cause

parent 356a396d
No related branches found
No related tags found
No related merge requests found
Pipeline #275355 passed
......@@ -304,7 +304,7 @@ class JSONScheduleImportForm(AdminIntermediateForm):
try:
schedule = json.loads(data)
except json.JSONDecodeError as ex:
raise ValidationError(_("Cannot decode as JSON"), "invalid")
raise ValidationError(_("Cannot decode as JSON"), "invalid") from ex
for field in ["input", "scheduled_aks"]:
if not field in schedule:
raise ValidationError(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment