Fix orphan transaction detail page

This commit is contained in:
Edgar P. Burkhart 2025-01-01 13:51:24 +01:00
parent c7994114a1
commit 898c92df23
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 3 additions and 2 deletions

View file

@ -17,7 +17,9 @@
<ul> <ul>
{% if statement %} {% if statement %}
<li> <li>
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a> {% with statement.account as account %}
<a href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
{% endwith %}
<a href="{{ statement.get_absolute_url }}">{{ statement }}</a> <a href="{{ statement.get_absolute_url }}">{{ statement }}</a>
</li> </li>
{% endif %} {% endif %}

View file

@ -72,7 +72,6 @@ class TransactionDetailView(NummiDetailView):
transaction = data.get("transaction") transaction = data.get("transaction")
return data | { return data | {
"account": transaction.statement.account,
"statement": transaction.statement, "statement": transaction.statement,
"category": transaction.category, "category": transaction.category,
} }