diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 5e9b4db..5155e58 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -1677,7 +1677,7 @@ class PlaceDetailView(ListView): def get_queryset(self): self.place = get_object_or_404(Place, pk=self.kwargs["pk"]) - return Event.objects.filter(exact_location=self.place).filter( + return get_event_qs(self.request).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__gte=datetime.now()).order_by("start_day") @@ -1693,7 +1693,7 @@ 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( + return get_event_qs(self.request).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") @@ -1955,7 +1955,7 @@ class TagDeleteView(PermissionRequiredMixin, DeleteView): def view_tag(request, t): paginator = Paginator( - Event.objects.filter(tags__contains=[t]).order_by( + get_event_qs(request).filter(tags__contains=[t]).order_by( "start_day", "start_time"), 10, )