From f21e2a1b2e7c36235448d11fa4b72777a6180216 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Mon, 30 May 2022 14:55:52 +0200 Subject: [PATCH] Fix bug when snapshot only has negative or positive transactions --- nummi/main/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nummi/main/views.py b/nummi/main/views.py index f26fee3..e4fe9c2 100644 --- a/nummi/main/views.py +++ b/nummi/main/views.py @@ -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"),