From df1347d5f10bc169d241d46a75bf6041b5febe12 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 30 Mar 2017 18:00:15 +0530 Subject: [PATCH] Contact image is replaced by gravatar only if no image attached --- frappe/email/doctype/contact/contact.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/doctype/contact/contact.py b/frappe/email/doctype/contact/contact.py index 6f24165c81..796f9ddb99 100644 --- a/frappe/email/doctype/contact/contact.py +++ b/frappe/email/doctype/contact/contact.py @@ -21,7 +21,7 @@ class Contact(Document): def validate(self): self.set_user() - if self.email_id: + if self.email_id and not self.image: self.image = has_gravatar(self.email_id) deduplicate_dynamic_links(self)