From b9af21ffaea6e20d741cf310e69f59c9a7f69daf Mon Sep 17 00:00:00 2001 From: Mads Nylund Date: Thu, 14 Dec 2023 23:41:56 +0100 Subject: [PATCH] fixed filtering --- app/content/views/event.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/content/views/event.py b/app/content/views/event.py index 4d5c34f0..55e3f6bc 100644 --- a/app/content/views/event.py +++ b/app/content/views/event.py @@ -81,7 +81,9 @@ def _list_queryset(self): .filter(~Q(category=category)) .order_by("-start_date") ) - return self.queryset.filter(~Q(category=category)) + return self.queryset.filter(end_date__gte=time).filter( + ~Q(category=category) + ) return self.queryset.filter(end_date__gte=time)