From 719403970695a9bc04f6f9ef767635830c0e7910 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 5 Jan 2025 17:12:29 +0100 Subject: [PATCH] Fix history_plot function with regard to category and account checks Fix #31 --- nummi/history/templatetags/history_extras.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nummi/history/templatetags/history_extras.py b/nummi/history/templatetags/history_extras.py index b924eb0..81b90a8 100644 --- a/nummi/history/templatetags/history_extras.py +++ b/nummi/history/templatetags/history_extras.py @@ -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))