From 70e8e9b8999920711b9f1df4df76f563f1629f5d Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Sat, 15 Mar 2025 16:02:27 +0530 Subject: [PATCH] fix: removed unused api's --- crm/api/session.py | 53 ---------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/crm/api/session.py b/crm/api/session.py index 746de854..3c12947c 100644 --- a/crm/api/session.py +++ b/crm/api/session.py @@ -30,59 +30,6 @@ def get_users(): return users -@frappe.whitelist() -def get_contacts(): - contacts = frappe.get_all( - "Contact", - fields=[ - "name", - "salutation", - "first_name", - "last_name", - "full_name", - "gender", - "address", - "designation", - "image", - "email_id", - "mobile_no", - "phone", - "company_name", - "modified", - ], - order_by="first_name asc", - distinct=True, - ) - - for contact in contacts: - contact["email_ids"] = frappe.get_all( - "Contact Email", - filters={"parenttype": "Contact", "parent": contact.name}, - fields=["name", "email_id", "is_primary"], - ) - - contact["phone_nos"] = frappe.get_all( - "Contact Phone", - filters={"parenttype": "Contact", "parent": contact.name}, - fields=["name", "phone", "is_primary_phone", "is_primary_mobile_no"], - ) - - return contacts - - -@frappe.whitelist() -def get_lead_contacts(): - lead_contacts = frappe.get_all( - "CRM Lead", - fields=["name", "lead_name", "mobile_no", "phone", "image", "modified"], - filters={"converted": 0}, - order_by="lead_name asc", - distinct=True, - ) - - return lead_contacts - - @frappe.whitelist() def get_organizations(): organizations = frappe.qb.get_query(