Fix previous commit
This commit is contained in:
parent
ef90d52807
commit
bf1d15574d
2 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ class AccountUpdateView(NummiUpdateView):
|
|||
"new_statement", kwargs={"account": account.pk}
|
||||
),
|
||||
"statements": _statements[:8],
|
||||
"history": history(account.transaction_set.exclude(category__budget=False)),
|
||||
"history": history(account.transaction_set),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -153,8 +153,8 @@ class TransactionYearView(UserMixin, TransactionACMixin, YearArchiveView):
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
context_data = super().get_context_data(**kwargs)
|
||||
h_data = context_data["transactions"]
|
||||
if "account" not in self.kwargs and "category" not in self.kwargs:
|
||||
h_data = context_data.get("transactions")
|
||||
if not (context_data.get("account") or context_data.get("category")):
|
||||
h_data = h_data.exclude(category__budget=False)
|
||||
|
||||
return context_data | {"history": history(h_data)}
|
||||
|
|
Loading…
Reference in a new issue