From 1515bb7f0b90d1a011e3705e5de83928351be5cf Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 21 Mar 2024 09:53:55 +0530 Subject: [PATCH] refactor: replace get_job with create_job_id utility method --- .../transaction_deletion_record.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index f1eb4e6a9b9..db5024bbc19 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -8,7 +8,7 @@ from frappe import _, qb 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.background_jobs import create_job_id, is_job_enqueued class TransactionDeletionRecord(Document): @@ -152,7 +152,7 @@ class TransactionDeletionRecord(Document): running_tasks = [] for x in job_names: if is_job_enqueued(x): - running_tasks.append(get_job(x).get_id()) + running_tasks.append(create_job_id(x)) if running_tasks: frappe.throw(