fix(Contact): use existing full name

This commit is contained in:
barredterra 2023-08-09 13:11:54 +02:00
parent 4a476217f2
commit 8a5d667c85

View file

@ -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):