diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 2692d5f..2dcf94e 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -1673,7 +1673,10 @@ class PlaceDetailViewPast(PlaceDetailView): def get_queryset(self): self.place = get_object_or_404(Place, pk=self.kwargs["pk"]) self.past = True - return Event.objects.filter(exact_location=self.place).filter(start_day__lte=datetime.now()).order_by("-start_day") + return Event.objects.filter(exact_location=self.place).filter( + Q(other_versions__isnull=True) | + Q(other_versions__representative=F('pk')) | + Q(other_versions__representative__isnull=True)).filter(start_day__lte=datetime.now()).order_by("-start_day") def get_context_data(self, **kwargs):