From 93259cab1d65c2e0c92be4c7eff3c67e75afa5d9 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Sat, 3 Feb 2024 04:42:28 +0100 Subject: [PATCH] fix(Bank Statement Import): scheduler not needed in dev mode (#39678) --- .../doctype/bank_statement_import/bank_statement_import.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py index 1a4747c55b..30e564c803 100644 --- a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py +++ b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py @@ -80,7 +80,8 @@ class BankStatementImport(DataImport): from frappe.utils.background_jobs import is_job_enqueued from frappe.utils.scheduler import is_scheduler_inactive - if is_scheduler_inactive() and not frappe.flags.in_test: + run_now = frappe.flags.in_test or frappe.conf.developer_mode + if is_scheduler_inactive() and not run_now: frappe.throw(_("Scheduler is inactive. Cannot import data."), title=_("Scheduler Inactive")) job_id = f"bank_statement_import::{self.name}" @@ -97,7 +98,7 @@ class BankStatementImport(DataImport): google_sheets_url=self.google_sheets_url, bank=self.bank, template_options=self.template_options, - now=frappe.conf.developer_mode or frappe.flags.in_test, + now=run_now, ) return True