From 4b86a41bd2d51f280b34a2673f7ef1130f25945e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 21 May 2013 17:17:36 +0530 Subject: [PATCH] [patch] update lead, contact in support ticket --- core/doctype/communication/communication.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/doctype/communication/communication.py b/core/doctype/communication/communication.py index 856de7de2a..56366a6d6e 100644 --- a/core/doctype/communication/communication.py +++ b/core/doctype/communication/communication.py @@ -115,13 +115,9 @@ def set_lead_and_contact(d): "name") or None if not d.company: - if d.lead: - company = webnotes.conn.get_value("Lead", d.lead, "company") - elif d.contact: - company = webnotes.conn.get_value("Contact", d.contact, "company") + d.company = webnotes.conn.get_value("Lead", d.lead, "company") or \ + webnotes.conn.get_default("company") - d.company = company or webnotes.conn.get_default("company") - class DocType(): def __init__(self, doc, doclist=[]): self.doc = doc