Fix email confirmation for users created through the superuser API

This commit is contained in:
Joseph Schorr 2015-03-03 14:26:48 -05:00
parent 2b64b348b2
commit edafa26e6e
2 changed files with 2 additions and 2 deletions

View file

@ -541,7 +541,7 @@ def confirm_user_email(code):
old_email = None
new_email = code.new_email
if new_email:
if new_email and new_email != old_email:
if find_user_by_email(new_email):
raise DataModelException('E-mail address already used.')