1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Changelog & grammar tweak for #3211

This commit is contained in:
Jeremy Stretch
2019-05-29 10:33:29 -04:00
parent a7ca49c44d
commit 28facca291
3 changed files with 4 additions and 5 deletions

View File

@ -70,6 +70,7 @@ class ExceptionHandlingMiddleware(object):
custom_template = 'exceptions/import_error.html'
elif isinstance(exception, PermissionError):
custom_template = 'exceptions/permission_error.html'
# Return a custom error message, or fall back to Django's default 500 error handling
if custom_template:
return server_error(request, template_name=custom_template)