From 91b8a48c0eddc1539e0895f2e2735ffc0c7145a0 Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Sun, 19 Oct 2025 18:07:16 +0530 Subject: [PATCH] perf: use cached doc --- crm/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crm/tasks.py b/crm/tasks.py index 39e79570..eadb778c 100644 --- a/crm/tasks.py +++ b/crm/tasks.py @@ -6,7 +6,7 @@ def sync_leads_from_all_enabled_sources(frequency: str | None = None) -> None: "Lead Sync Source", filters={"enabled": 1, "background_sync_frequency": frequency}, pluck="name" ) for source in enabled_sources: - lead_sync_source = frappe.get_doc("Lead Sync Source", source) + lead_sync_source = frappe.get_cached_doc("Lead Sync Source", source) try: lead_sync_source._sync_leads() except Exception as _: