Fix history_plot function with regard to category and account checks

Fix 
This commit is contained in:
Edgar P. Burkhart 2025-01-05 17:12:29 +01:00
parent c153000d3d
commit 7194039706
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -16,7 +16,7 @@ def history_plot(context, transactions, **kwargs):
kwargs.setdefault("account", context.get("account"))
kwargs.setdefault("category", context.get("category"))
if "category" in kwargs or "account" in kwargs:
if kwargs.get("category") or kwargs.get("account"):
kwargs["history"] = history(transactions.all())
else:
kwargs["history"] = history(transactions.exclude(category__budget=False))