Fix bug when snapshot only has negative or positive transactions

This commit is contained in:
Edgar P. Burkhart 2022-05-30 14:55:52 +02:00
parent f359426997
commit f21e2a1b2e
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -178,7 +178,7 @@ def snapshot(request, uuid=None):
)
context["cat_lim"] = max(
map(
abs,
lambda x: abs(x) if x else 0,
context["categories"]
.aggregate(
max=models.Max("sum_p"),