mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
fix: Set customer only if contact is present (#23704)
This commit is contained in:
@@ -15,9 +15,9 @@ class CallLog(Document):
|
|||||||
number = strip_number(self.get('from'))
|
number = strip_number(self.get('from'))
|
||||||
self.contact = get_contact_with_phone_number(number)
|
self.contact = get_contact_with_phone_number(number)
|
||||||
self.lead = get_lead_with_phone_number(number)
|
self.lead = get_lead_with_phone_number(number)
|
||||||
|
if self.contact:
|
||||||
contact = frappe.get_doc("Contact", self.contact)
|
contact = frappe.get_doc("Contact", self.contact)
|
||||||
self.customer = contact.get_link_for("Customer")
|
self.customer = contact.get_link_for("Customer")
|
||||||
|
|
||||||
def after_insert(self):
|
def after_insert(self):
|
||||||
self.trigger_call_popup()
|
self.trigger_call_popup()
|
||||||
|
|||||||
Reference in New Issue
Block a user