From 8a5d667c856b8dd37e53a3dddb1ed6057d6ecbf1 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:11:54 +0200 Subject: [PATCH] fix(Contact): use existing full name --- frappe/contacts/doctype/contact/contact.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frappe/contacts/doctype/contact/contact.py b/frappe/contacts/doctype/contact/contact.py index a3407e9c63..e78f1b006c 100644 --- a/frappe/contacts/doctype/contact/contact.py +++ b/frappe/contacts/doctype/contact/contact.py @@ -217,18 +217,15 @@ def invite_user(contact): @frappe.whitelist() def get_contact_details(contact): contact = frappe.get_doc("Contact", contact) - out = { + return { "contact_person": contact.get("name"), - "contact_display": " ".join( - filter(None, [contact.get("salutation"), contact.get("first_name"), contact.get("last_name")]) - ), + "contact_display": contact.get("full_name"), "contact_email": contact.get("email_id"), "contact_mobile": contact.get("mobile_no"), "contact_phone": contact.get("phone"), "contact_designation": contact.get("designation"), "contact_department": contact.get("department"), } - return out def update_contact(doc, method):