From 5b6c17fd6a55a931d81fc696043a50945eedfc5a Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Tue, 12 Nov 2024 21:39:17 +0100 Subject: [PATCH] Correction compte --- src/agenda_culturel/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index f578f1e..26e69de 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -1436,7 +1436,7 @@ class Event(models.Model): recurrentimport = RecurrentImport.objects.filter(source=OuterRef("import_sources__0")).order_by().annotate(count=Func(F('id'), function='Count')).values('count') - nb_manual_creation = Event.objects.filter(created_date__gte=start, created_date__lt=end, imported_date__isnull=True, uuids__len=0).count() + nb_manual_creation = Event.objects.filter(created_date__gte=start, created_date__lt=end, imported_date__isnull=True).filter(Q(uuids__len=0)|Q(uuids=None)).count() nb_local_copies = Event.objects.filter(created_date__gte=start, created_date__lt=end, imported_date__isnull=True, uuids__len__gt=0).count() imported = Event.objects.filter(created_date__gte=start, created_date__lt=end, imported_date__isnull=False, uuids__len__gt=0).annotate(nb_rimport=Subquery(recurrentimport))