On intègre des événements passés à la trappe dans le décompte
This commit is contained in:
parent
dafadecd23
commit
1dead2a695
@ -1437,9 +1437,9 @@ class Event(models.Model):
|
||||
|
||||
|
||||
nb_manual_creation = Event.objects.filter(created_date__gte=start, created_date__lt=end, imported_date__isnull=True).count()
|
||||
imported = Event.objects.filter(created_date__gte=start, created_date__lt=end, imported_date__isnull=False, import_sources__len__gt=0).annotate(nb_rimport=Subquery(recurrentimport))
|
||||
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))
|
||||
|
||||
nb_manual_import = imported.filter(nb_rimport=0).count()
|
||||
nb_manual_import = imported.filter(Q(import_sources__len=0)|Q(nb_rimport=0)).count()
|
||||
nb_first_import = imported.filter(nb_rimport__gt=0).count()
|
||||
|
||||
return {"when": (start, start + timedelta(days=when[1] - 1)), "nb_manual_creation": nb_manual_creation, "nb_manual_import": nb_manual_import, "nb_first_import": nb_first_import}
|
||||
|
Loading…
Reference in New Issue
Block a user