diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-02-19 08:09:40 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-02-19 08:09:40 +0000 |
| commit | 127725c56062659c284b18ca097db99be863227b (patch) | |
| tree | b6114213bf6e13e826fdd7fffd2816f083171561 | |
| parent | 670f4d9628c047aac1473bffa520863f74a4614f (diff) | |
Fixed #15322 -- Removed a redundant check in admin logins. Thanks to melinath for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/admin/forms.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/forms.py b/django/contrib/admin/forms.py index 5a245a39af..f26c10014d 100644 --- a/django/contrib/admin/forms.py +++ b/django/contrib/admin/forms.py @@ -25,7 +25,7 @@ class AdminAuthenticationForm(AuthenticationForm): if username and password: self.user_cache = authenticate(username=username, password=password) if self.user_cache is None: - if username is not None and u'@' in username: + if u'@' in username: # Mistakenly entered e-mail address instead of username? Look it up. try: user = User.objects.get(email=username) |
