Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #15628 -- Made the admin error email more useful when there isn…

…'t a request associated with the message. Thanks to hynek for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7ab5ce6cf1f2ea01857f828836d1bc6a21c1109f 1 parent 354aa94
@freakboy3742 freakboy3742 authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 django/utils/log.py
View
6 django/utils/log.py
@@ -79,7 +79,11 @@ def emit(self, record):
)
request_repr = repr(request)
except:
- subject = 'Error: Unknown URL'
+ subject = '%s: %s' % (
+ record.levelname,
+ record.msg
+ )
+
request = None
request_repr = "Request repr() unavailable"
Please sign in to comment.
Something went wrong with that request. Please try again.