Ticket #15322: unnecessary.diff

File unnecessary.diff, 686 bytes (added by Stephen Burrows, 14 years ago)
  • django/contrib/admin/forms.py

    diff --git a/django/contrib/admin/forms.py b/django/contrib/admin/forms.py
    index 5a245a3..f26c100 100644
    a b class AdminAuthenticationForm(AuthenticationForm):  
    2525        if username and password:
    2626            self.user_cache = authenticate(username=username, password=password)
    2727            if self.user_cache is None:
    28                 if username is not None and u'@' in username:
     28                if u'@' in username:
    2929                    # Mistakenly entered e-mail address instead of username? Look it up.
    3030                    try:
    3131                        user = User.objects.get(email=username)
Back to Top