Преглед на файлове

Tweaked exception-handling middleware to preserve tracebacks

Jeremy Stretch преди 8 години
родител
ревизия
2519ebff9d
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      netbox/utilities/middleware.py

+ 2 - 2
netbox/utilities/middleware.py

@@ -57,9 +57,9 @@ class ExceptionHandlingMiddleware(object):
 
 
     def process_exception(self, request, exception):
     def process_exception(self, request, exception):
 
 
-        # Raise exceptions if in debug mode
+        # Don't catch exceptions when in debug mode
         if settings.DEBUG:
         if settings.DEBUG:
-            raise exception
+            return
 
 
         # Determine the type of exception
         # Determine the type of exception
         if isinstance(exception, ProgrammingError):
         if isinstance(exception, ProgrammingError):