Refactor category_plot tag to remove budget parameter

Fix 
This commit is contained in:
Edgar P. Burkhart 2025-01-05 15:15:35 +01:00
parent d246843be0
commit 608da4be55
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 3 additions and 3 deletions
nummi
category/templatetags
statement/templates/statement

View file

@ -6,10 +6,10 @@ register = template.Library()
@register.inclusion_tag("category/category_plot.html", takes_context=True)
def category_plot(context, transactions, budget=True, **kwargs):
def category_plot(context, transactions, **kwargs):
kwargs.setdefault("account", context.get("account"))
if budget:
if not kwargs.get("account"):
transactions = transactions.exclude(category__budget=False)
categories = (
transactions.values("category", "category__name", "category__icon")

View file

@ -65,6 +65,6 @@
</section>
<section>
<h3>{% translate "Categories" %}</h3>
{% category_plot transactions budget=False statement=object %}
{% category_plot transactions statement=object %}
</section>
{% endblock body %}