diff --git a/netbox/utilities/middleware.py b/netbox/utilities/middleware.py index 2909acfa7..927855e0e 100644 --- a/netbox/utilities/middleware.py +++ b/netbox/utilities/middleware.py @@ -57,9 +57,9 @@ class ExceptionHandlingMiddleware(object): def process_exception(self, request, exception): - # Raise exceptions if in debug mode + # Don't catch exceptions when in debug mode if settings.DEBUG: - raise exception + return # Determine the type of exception if isinstance(exception, ProgrammingError):