In category_plot templatetag, replace filter budget with exclude not budget
This commit is contained in:
parent
eabdaf2516
commit
a5dd41b533
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ register = template.Library()
|
||||||
@register.inclusion_tag("category/category_plot.html")
|
@register.inclusion_tag("category/category_plot.html")
|
||||||
def category_plot(transactions, **kwargs):
|
def category_plot(transactions, **kwargs):
|
||||||
categories = (
|
categories = (
|
||||||
transactions.filter(category__budget=True)
|
transactions.exclude(category__budget=False)
|
||||||
.values("category", "category__name", "category__icon")
|
.values("category", "category__name", "category__icon")
|
||||||
.annotate(
|
.annotate(
|
||||||
sum=models.Sum("value"),
|
sum=models.Sum("value"),
|
||||||
|
|
Loading…
Reference in a new issue