Removed the excess "with_type" from the success redirection of the update_transaction view.

This commit is contained in:
2023-03-08 22:10:21 +08:00
parent ff9ff4bdcf
commit 1f87bc00e8
2 changed files with 4 additions and 4 deletions

View File

@ -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("/<transaction:txn>/delete", endpoint="delete")