From 37ba64eca8190357f60e08702fc80b6f737f9576 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Fri, 28 Jul 2023 18:56:21 +0200 Subject: [PATCH] fix teams match index --- scores/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scores/views.py b/scores/views.py index b202854..c2d0c74 100644 --- a/scores/views.py +++ b/scores/views.py @@ -96,7 +96,7 @@ def teams_club_name_tournament_name(request, club_name, tournament_shortname): def teams_tournament(request, tournament_id): tournament = get_object_or_404(Tournament, pk=tournament_id) - match = Match.objects.filter(tournament=tournament.id).filter(match_index=0).first() + match = Match.objects.filter(tournament=tournament.id).filter(match_index=-1).first() teams = Team.objects.filter(match=match.id).order_by('position') template = loader.get_template('scores/match.html') context = { @@ -162,7 +162,7 @@ def tv_teams_club_name_tournament_name(request, club_name, tournament_shortname) def tv_teams_tournament(request, tournament_id): tournament = get_object_or_404(Tournament, pk=tournament_id) - match = Match.objects.filter(tournament=tournament.id).filter(match_index=0).first() + match = Match.objects.filter(tournament=tournament.id).filter(match_index=-1).first() teams = Team.objects.filter(match=match.id).order_by('position') template = loader.get_template('scores/match.html') context = {