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

Add exception cause

parent 81972198
No related branches found
No related tags found
1 merge request!24Feature: JSON import file upload button and schema input validation
......@@ -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