From 6030de53fcaff687670dbd7cb8042d885d2b1caf Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Thu, 20 Apr 2023 15:19:33 +0200 Subject: [PATCH] Fix empty category bug --- nummi/main/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nummi/main/views.py b/nummi/main/views.py index a95c403..2806b42 100644 --- a/nummi/main/views.py +++ b/nummi/main/views.py @@ -263,8 +263,8 @@ class SnapshotUpdateView(NummiUpdateView): "data": _categories, "max": max( _categories.aggregate( - max=models.Max("sum_p"), - min=models.Min("sum_m"), + max=models.Max("sum_p", default=0), + min=models.Min("sum_m", default=0), ).values(), ), }