From 13216e12ddb2ecef4921b884abf8be157b537a45 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 20 Jun 2007 06:01:16 +0000 Subject: [PATCH] Fixed #4618 -- Fixed error in django.contrib.redirects new_path handling. Thanks, cephelo@gmail.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@5494 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/redirects/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/redirects/middleware.py b/django/contrib/redirects/middleware.py index 32f2760c45..8998c2ce3e 100644 --- a/django/contrib/redirects/middleware.py +++ b/django/contrib/redirects/middleware.py @@ -19,7 +19,7 @@ class RedirectFallbackMiddleware(object): except Redirect.DoesNotExist: pass if r is not None: - if r == '': + if r.new_path == '': return http.HttpResponseGone() return http.HttpResponsePermanentRedirect(r.new_path)