diff --git a/finance/app/routers/gui.py b/finance/app/routers/gui.py index 1bc3825..f6e0451 100644 --- a/finance/app/routers/gui.py +++ b/finance/app/routers/gui.py @@ -84,9 +84,11 @@ def buchungen( offset=0, session=session, ) + accounts = session.execute(select(Account)).scalars().all() return templates.TemplateResponse(request, "transactions.html", { "transactions": txs, - "accounts": session.execute(select(Account)).scalars().all(), + "accounts": accounts, + "account_names": {a.id: a.name for a in accounts}, "categories": session.execute(select(Category)).scalars().all(), "filters": { "account_id": account_id, diff --git a/finance/app/templates/transactions.html b/finance/app/templates/transactions.html index 06453dd..9c8d8b6 100644 --- a/finance/app/templates/transactions.html +++ b/finance/app/templates/transactions.html @@ -50,7 +50,7 @@ {% for tx in transactions %}