Fix category budget toggle

This commit is contained in:
Edgar P. Burkhart 2023-04-16 17:33:51 +02:00
parent 07bb604eda
commit 91dcd0962e
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 2 additions and 0 deletions

View file

@ -44,6 +44,7 @@ class HistoryView(UserMixin, MultipleObjectMixin, View):
{
"data": list(
self.get_queryset()
.filter(category__budget=True)
.values(month=TruncMonth("date"))
.annotate(
sum_p=Sum(

View file

@ -28,6 +28,7 @@ class CategoryForm(NummiForm):
fields = [
"name",
"icon",
"budget",
]