perf: Only check transaction deletion record once during req/job

This commit is contained in:
Ankush Menat
2025-10-10 12:44:33 +05:30
parent eac6e6a7dd
commit 8d723d3da6

View File

@@ -9,6 +9,7 @@ from frappe.desk.notifications import clear_notifications
from frappe.model.document import Document
from frappe.utils import cint, comma_and, create_batch, get_link_to_form
from frappe.utils.background_jobs import get_job, is_job_enqueued
from frappe.utils.caching import request_cache
LEDGER_ENTRY_DOCTYPES = frozenset(
(
@@ -482,6 +483,7 @@ def get_doctypes_to_be_ignored():
@frappe.whitelist()
@request_cache
def is_deletion_doc_running(company: str | None = None, err_msg: str | None = None):
if not company:
return