fix: Set customer only if contact is present (#23704)
This commit is contained in:
parent
52514a30d7
commit
6a0eb61af3
@ -15,9 +15,9 @@ class CallLog(Document):
|
||||
number = strip_number(self.get('from'))
|
||||
self.contact = get_contact_with_phone_number(number)
|
||||
self.lead = get_lead_with_phone_number(number)
|
||||
|
||||
contact = frappe.get_doc("Contact", self.contact)
|
||||
self.customer = contact.get_link_for("Customer")
|
||||
if self.contact:
|
||||
contact = frappe.get_doc("Contact", self.contact)
|
||||
self.customer = contact.get_link_for("Customer")
|
||||
|
||||
def after_insert(self):
|
||||
self.trigger_call_popup()
|
||||
|
Loading…
x
Reference in New Issue
Block a user