Only show budgeted categories on snapshot page
This commit is contained in:
parent
08b3c3dd18
commit
364ad42c05
1 changed files with 2 additions and 3 deletions
|
@ -166,9 +166,8 @@ def snapshot(request, uuid=None):
|
|||
|
||||
if _snapshot.transactions:
|
||||
context["categories"] = (
|
||||
_snapshot.transactions.values(
|
||||
"category", "category__name", "category__icon"
|
||||
)
|
||||
_snapshot.transactions.filter(category__budget=True)
|
||||
.values("category", "category__name", "category__icon")
|
||||
.annotate(
|
||||
sum=models.Sum("value"),
|
||||
sum_m=models.Sum("value", filter=models.Q(value__lt=0)),
|
||||
|
|
Loading…
Reference in a new issue