mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-16 13:25:10 +00:00
perf: Only check transaction deletion record once during req/job
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user