From 969e8c76a6ad06cd2a23b7bb0cda790458d26e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 26 Apr 2023 13:29:14 +0800 Subject: [PATCH] Renamed the "journal_entry_date" parameter to "date" in the "sort_journal_entries_in" function in the "accounting.journal_entry.forms.reorder" module. --- src/accounting/journal_entry/forms/reorder.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/accounting/journal_entry/forms/reorder.py b/src/accounting/journal_entry/forms/reorder.py index cd83570..d2cb322 100644 --- a/src/accounting/journal_entry/forms/reorder.py +++ b/src/accounting/journal_entry/forms/reorder.py @@ -26,17 +26,15 @@ from accounting import db from accounting.models import JournalEntry -def sort_journal_entries_in(journal_entry_date: dt.date, - exclude: int | None = None) -> None: +def sort_journal_entries_in(date: dt.date, exclude: int | None = None) -> None: """Sorts the journal entries under a date after changing the date or deleting a journal entry. - :param journal_entry_date: The date of the journal entry. + :param date: The date of the journal entry. :param exclude: The journal entry ID to exclude. :return: None. """ - conditions: list[sa.BinaryExpression] \ - = [JournalEntry.date == journal_entry_date] + conditions: list[sa.BinaryExpression] = [JournalEntry.date == date] if exclude is not None: conditions.append(JournalEntry.id != exclude) journal_entries: list[JournalEntry] = JournalEntry.query\