fix: contact page not loading

(cherry picked from commit cef20e37c23ffbf36991f50fa7eade41edf10a11)
This commit is contained in:
Shariq Ansari 2025-04-22 12:57:20 +05:30 committed by Mergify
parent eaa794f862
commit 8282e09949

View File

@ -30,15 +30,7 @@ def get_contact(name):
if not len(contact):
frappe.throw(_("Contact not found"), frappe.DoesNotExistError)
contact = contact.pop()
contact["doctype"] = "Contact"
contact["email_ids"] = frappe.get_all(
"Contact Email", filters={"parent": name}, fields=["name", "email_id", "is_primary"]
)
contact["phone_nos"] = frappe.get_all(
"Contact Phone", filters={"parent": name}, fields=["name", "phone", "is_primary_mobile_no"]
)
return contact