Fix canonical_email for addresses with utf-8

This commit is contained in:
Keith Mitchell
2012-12-06 16:33:22 -08:00
committed by Neil Williams
parent 099b6afa6f
commit 21fdf7e0ab

View File

@@ -570,7 +570,7 @@ class Account(Thing):
return which.get(canon, None)
def canonical_email(self):
email = str(self.email.lower())
email = self.email.lower().encode('utf-8')
if email.count("@") != 1:
return "invalid@invalid.invalid"