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
This commit is contained in:
Adrian Holovaty 2007-06-20 06:01:16 +00:00
parent 18619a11ee
commit 13216e12dd
1 changed files with 1 additions and 1 deletions

View File

@ -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)