Merge pull request #4004 from manqala/develop

Strip email ids in Contact before save
This commit is contained in:
Rushabh Mehta 2017-08-28 16:02:24 +05:30 committed by GitHub
commit 00ec6476ee

View file

@ -22,6 +22,7 @@ class Contact(Document):
break
def validate(self):
self.email_id = self.email_id.strip()
self.set_user()
if self.email_id and not self.image:
self.image = has_gravatar(self.email_id)