mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-30 12:08:26 +00:00
fix(treewide): manual ruff fixes
(cherry picked from commit f63396ef47)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
@@ -112,7 +112,13 @@ class TestHolidayList(unittest.TestCase):
|
||||
frappe.local.lang = lang
|
||||
|
||||
|
||||
def make_holiday_list(name, from_date=getdate() - timedelta(days=10), to_date=getdate(), holiday_dates=None):
|
||||
def make_holiday_list(name, from_date=None, to_date=None, holiday_dates=None):
|
||||
if from_date is None:
|
||||
from_date = getdate() - timedelta(days=10)
|
||||
|
||||
if to_date is None:
|
||||
to_date = getdate()
|
||||
|
||||
frappe.delete_doc_if_exists("Holiday List", name, force=1)
|
||||
doc = frappe.get_doc(
|
||||
{
|
||||
|
||||
@@ -486,12 +486,7 @@ def is_deletion_doc_running(company: str | None = None, err_msg: str | None = No
|
||||
def check_for_running_deletion_job(doc, method=None):
|
||||
# Check if DocType has 'company' field
|
||||
df = qb.DocType("DocField")
|
||||
if (
|
||||
not_allowed := qb.from_(df)
|
||||
.select(df.parent)
|
||||
.where((df.fieldname == "company") & (df.parent == doc.doctype))
|
||||
.run()
|
||||
):
|
||||
if qb.from_(df).select(df.parent).where((df.fieldname == "company") & (df.parent == doc.doctype)).run():
|
||||
is_deletion_doc_running(
|
||||
doc.company, _("Cannot make any transactions until the deletion job is completed")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user