From 66a03a9dca1973eee61c6e2a8accc638a83cd160 Mon Sep 17 00:00:00 2001 From: lagertonne Date: Tue, 24 Dec 2024 07:05:47 +0100 Subject: [PATCH] metrics: Fix inverted return state in metrics --- core/core/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core/metrics.py b/core/core/metrics.py index 083bda2..149829c 100644 --- a/core/core/metrics.py +++ b/core/core/metrics.py @@ -17,7 +17,7 @@ class ItemCountCollector(object): Item.all_objects .annotate( returned=Case( - When(returned_at__isnull=False, then=Value(False)), + When(returned_at__isnull=True, then=Value(False)), default=Value(True), output_field=BooleanField() )