Commits

Anonymous committed afec727

fix a possible exception in the UserForm if a user only fills out one password

Comments (0)

Files changed (3)

 recursive-include accounts/templates *
 recursive-include docs *
 include LICENSE
-include README
+include README.md

accounts/__init__.py

     'minor': 1,
     'micro': 0,
     'releaselevel': 'alpha',
-    'serial': 4
+    'serial': 5
 }
 
 def get_version(short=False):

accounts/forms.py

         password2 = cleaned_data.get('password2')
         if password != password2:
             self._errors['password'] = self.error_class([u'Passwords do not match.'])
-            del cleaned_data['password']
-            del cleaned_data['password2']
+            try:
+                del cleaned_data['password']
+            except KeyError:
+                pass
+            try:
+                del cleaned_data['password2']
+            except KeyError:
+                pass
         return cleaned_data
 
     def save(self, *args, **kwargs):