diff --git a/tournaments/views.py b/tournaments/views.py index 71e9536..b4e252a 100644 --- a/tournaments/views.py +++ b/tournaments/views.py @@ -348,11 +348,13 @@ def handle_year_month_filtering(year_param, club_id, filter_type, is_future=True return available_years, selected_year def clubs(request): - all_clubs = Club.objects.all().order_by('name') - clubs = [] - for club in all_clubs: - if club.events_count() > 0: - clubs.append(club) + # all_clubs = Club.objects.all().order_by('name') + # clubs = [] + # for club in all_clubs: + # if club.events_count() > 0: + # clubs.append(club) + + clubs = Club.objects.filter(events__tournaments__end_date__isnull=False).distinct() return render(request, 'tournaments/clubs.html', { 'clubs': clubs,