From a18040fb57155deacbf9c99981c292101af53709 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 10 May 2024 20:07:03 +0200 Subject: [PATCH] fix(metrics): shiftregister_helpers_required returns None on fresh instance --- shiftregister/metrics/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shiftregister/metrics/views.py b/shiftregister/metrics/views.py index 3e2cbeb..1c77f50 100644 --- a/shiftregister/metrics/views.py +++ b/shiftregister/metrics/views.py @@ -105,7 +105,8 @@ def metrics(request): default=F("required_helpers"), ) ) - .aggregate(sum=Sum("real_required_helpers"))["sum"], + .aggregate(sum=Sum("real_required_helpers"))["sum"] + or 0, ), ( "messages_sent_total",