From 7bddd6477180d9aa983b8407f9efb26102b612ec Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 6 Jun 2025 12:43:44 +0530 Subject: [PATCH] perf: Skip fetching non-existing call log (#47930) --- erpnext/telephony/doctype/call_log/call_log.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/telephony/doctype/call_log/call_log.py b/erpnext/telephony/doctype/call_log/call_log.py index fd4a0dffd8d..23cd8537032 100644 --- a/erpnext/telephony/doctype/call_log/call_log.py +++ b/erpnext/telephony/doctype/call_log/call_log.py @@ -202,6 +202,8 @@ def get_linked_call_logs(doctype, docname): fields=["parent"], filters={"parenttype": "Call Log", "link_doctype": doctype, "link_name": docname}, ) + if not logs: + return [] logs = {log.parent for log in logs}