diff --git a/src/accounting/transaction/views.py b/src/accounting/transaction/views.py index 8f71cd9..a888199 100644 --- a/src/accounting/transaction/views.py +++ b/src/accounting/transaction/views.py @@ -158,12 +158,12 @@ def update_transaction(txn: Transaction) -> redirect: form.populate_obj(txn) if not form.is_modified: flash(lazy_gettext("The transaction was not modified."), "success") - return redirect(inherit_next(with_type(__get_detail_uri(txn)))) + return redirect(inherit_next(__get_detail_uri(txn))) txn.updated_by_id = get_current_user_pk() txn.updated_at = sa.func.now() db.session.commit() flash(lazy_gettext("The transaction is updated successfully."), "success") - return redirect(inherit_next(with_type(__get_detail_uri(txn)))) + return redirect(inherit_next(__get_detail_uri(txn))) @bp.post("//delete", endpoint="delete") diff --git a/tests/test_transaction.py b/tests/test_transaction.py index deec082..0f613ee 100644 --- a/tests/test_transaction.py +++ b/tests/test_transaction.py @@ -1741,7 +1741,7 @@ class TransferTransactionTestCase(unittest.TestCase): """ from accounting.models import Transaction, TransactionCurrency txn_id: int = add_txn(self.client, self.__get_add_form()) - detail_uri: str = f"{PREFIX}/{txn_id}?as=income&next=%2F_next" + detail_uri: str = f"{PREFIX}/{txn_id}?next=%2F_next" update_uri: str = f"{PREFIX}/{txn_id}/update?as=income" form_0: dict[str, str] = self.__get_update_form(txn_id) form_0 = {x: form_0[x] for x in form_0 if "-debit-" not in x} @@ -1840,7 +1840,7 @@ class TransferTransactionTestCase(unittest.TestCase): """ from accounting.models import Transaction, TransactionCurrency txn_id: int = add_txn(self.client, self.__get_add_form()) - detail_uri: str = f"{PREFIX}/{txn_id}?as=expense&next=%2F_next" + detail_uri: str = f"{PREFIX}/{txn_id}?next=%2F_next" update_uri: str = f"{PREFIX}/{txn_id}/update?as=expense" form_0: dict[str, str] = self.__get_update_form(txn_id) form_0 = {x: form_0[x] for x in form_0 if "-credit-" not in x}