check for form.password in the off chance that a user is logged in and the server...
authorRodney Ewing <ewing.rj@gmail.com>
Fri, 12 Jul 2013 19:27:41 +0000 (12:27 -0700)
committerRodney Ewing <ewing.rj@gmail.com>
Tue, 20 Aug 2013 15:25:45 +0000 (08:25 -0700)
mediagoblin/edit/views.py

index 82cec8dac193ec7ea425572e77e6ef36364295d9..53a63cd0785b5a667e8aef701c1c6db539300797 100644 (file)
@@ -444,7 +444,7 @@ def change_email(request):
                 _('Sorry, a user with that email address'
                     ' already exists.'))
 
-        if user.pw_hash and not auth.check_password(
+        if form.password and user.pw_hash and not auth.check_password(
                 form.password.data, user.pw_hash):
             form.password.errors.append(
                 _('Wrong password'))