Skip to content

Commit

Permalink
Filter Events by active ones (starts after now)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcai122 authored Apr 18, 2024
1 parent 2ee4b7e commit f494284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/clubs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2426,7 +2426,7 @@ def destroy(self, request, *args, **kwargs):
return super().destroy(request, *args, **kwargs)

def get_queryset(self):
qs = Event.objects.all()
qs = Event.objects.filter(start_time__gte=timezone.now())
is_club_specific = self.kwargs.get("club_code") is not None
if is_club_specific:
qs = qs.filter(club__code=self.kwargs["club_code"])
Expand Down

0 comments on commit f494284

Please sign in to comment.