From 578233d66d721dc61e7d893246304c463abc49d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 8 Mar 2023 22:04:26 +0800 Subject: [PATCH] Renamed the sort_accounts view to sort_transactions in the "accounting.transaction.views" module, and fixed its url endpoints on success. --- src/accounting/transaction/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/accounting/transaction/views.py b/src/accounting/transaction/views.py index ac949b4..9b13d31 100644 --- a/src/accounting/transaction/views.py +++ b/src/accounting/transaction/views.py @@ -199,7 +199,7 @@ def show_transaction_order(txn_date: date) -> str: @bp.post("/dates/", endpoint="sort") @has_permission(can_edit) -def sort_accounts(txn_date: date) -> redirect: +def sort_transactions(txn_date: date) -> redirect: """Reorders the transactions in a date. :param txn_date: The date. @@ -210,10 +210,10 @@ def sort_accounts(txn_date: date) -> redirect: form.save_order() if not form.is_modified: flash(lazy_gettext("The order was not modified."), "success") - return redirect(or_next(url_for("accounting.account.list"))) + return redirect(or_next(url_for("accounting.transaction.list"))) db.session.commit() flash(lazy_gettext("The order is updated successfully."), "success") - return redirect(or_next(url_for("accounting.account.list"))) + return redirect(or_next(url_for("accounting.transaction.list"))) def __get_detail_uri(txn: Transaction) -> str: