fix teams match index

main
Razmig Sarkissian 2 years ago
parent dcb728ba88
commit 37ba64eca8
  1. 4
      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 = {

Loading…
Cancel
Save