From 79159f495d29616e3ac3b57ffaf11c8f19ba8726 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 16 Dec 2014 10:46:32 +0530 Subject: [PATCH] Minor fix in communication --- frappe/core/doctype/communication/communication.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index af98c0f076..f18c89a5b8 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -25,8 +25,9 @@ class Communication(Document): def update_parent(self): """update status of parent Lead or Contact based on who is replying""" - parent_doc = self.get_parent_doc() - parent_doc.run_method("on_communication") + if self.parenttype and self.parent: + parent_doc = self.get_parent_doc() + parent_doc.run_method("on_communication") def on_update(self): self.update_parent()