Skip to content

Commit

Permalink
catch exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Wolfsdorf committed Dec 11, 2019
1 parent 169909f commit 7f85495
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions infra/apps/catalog/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def post(self, request, *args, **kwargs):
except ValidationError as e:
messages.error(request, e)
return self.form_invalid(form)
except PermissionError as e:
messages.error(request, e)
return self.form_invalid(form)

validation_error_messages = catalog.validate()
for error_message in validation_error_messages:
Expand Down

0 comments on commit 7f85495

Please sign in to comment.