Commit afb8c44c authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.2.X] Fixed #15187 -- Ensure that missing page emails aren't sent when...

[1.2.X] Fixed #15187 -- Ensure that missing page emails aren't sent when running under debug. Thanks to Dan Carroll for the report and patch.

Backport of r15363 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15365 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 7e83c3b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ class CommonMiddleware(object):
    def process_response(self, request, response):
        "Send broken link emails and calculate the Etag, if needed."
        if response.status_code == 404:
            if settings.SEND_BROKEN_LINK_EMAILS:
            if settings.SEND_BROKEN_LINK_EMAILS and not settings.DEBUG:
                # If the referrer was from an internal link or a non-search-engine site,
                # send a note to the managers.
                domain = request.get_host()