From 91d8adc1b07a7cf8df91c6429abe76a84104407d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 29 Aug 2017 10:34:20 +0530 Subject: [PATCH] [fix] contact.py --- frappe/contacts/doctype/contact/contact.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/contacts/doctype/contact/contact.py b/frappe/contacts/doctype/contact/contact.py index 0c78679f10..23027449b1 100644 --- a/frappe/contacts/doctype/contact/contact.py +++ b/frappe/contacts/doctype/contact/contact.py @@ -22,7 +22,8 @@ class Contact(Document): break def validate(self): - self.email_id = self.email_id.strip() + if self.email_id: + 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)