Commits

Anonymous committed 62dcaaa

Use count(1) to check if email is taken (more efficient).

Comments (0)

Files changed (1)

registration/forms.py

         
         """
         email = self.cleaned_data['email'].lower()
-        if User.all().filter('email =', email):
+        if User.all().filter('email =', email).count(1):
             raise forms.ValidationError(_(u'This email address is already in use. Please supply a different email address.'))
         return email