From b651ff0bb5ff36a3a07143c0e7694660cb0a213a Mon Sep 17 00:00:00 2001 From: Raz Date: Sat, 15 Mar 2025 16:12:45 +0100 Subject: [PATCH] fix broadcast not displaying any matches --- tournaments/models/tournament.py | 8 ++++++-- tournaments/static/tournaments/css/style.css | 1 + .../templates/tournaments/broadcast/broadcast_club.html | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 2a69060..b30a4f6 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -661,8 +661,8 @@ class Tournament(models.Model): matches.extend(first_round.get_matches_recursive(True)) else: current_round = self.round_to_show() - # print(f'current_round = {current_round.index} / parent = {current_round.parent}') if current_round: + print(f'current_round = {current_round.index} / parent = {current_round.parent}') all_upper_matches_are_over = current_round.all_matches_are_over() if all_upper_matches_are_over is False: matches.extend(current_round.get_matches_recursive(True)) @@ -689,8 +689,12 @@ class Tournament(models.Model): previous_previous_matches = [m for m in previous_previous_matches if m.end_date is None] matches.extend(previous_previous_matches) else: - # print('group_stages') + print('group_stages') group_stages = [gs.live_group_stages() for gs in self.last_group_stage_step()] + else: + first_round = self.first_round() + if first_round: + matches.extend(first_round.get_matches_recursive(True)) return matches, group_stages diff --git a/tournaments/static/tournaments/css/style.css b/tournaments/static/tournaments/css/style.css index 4421f9d..efd1af6 100644 --- a/tournaments/static/tournaments/css/style.css +++ b/tournaments/static/tournaments/css/style.css @@ -664,6 +664,7 @@ h-margin { /* Summons */ .table-row-3-colums-summons { + grid-template-columns: 35% 1fr 25%; display: flex; align-items: center; } diff --git a/tournaments/templates/tournaments/broadcast/broadcast_club.html b/tournaments/templates/tournaments/broadcast/broadcast_club.html index 8f5f87e..77196a4 100644 --- a/tournaments/templates/tournaments/broadcast/broadcast_club.html +++ b/tournaments/templates/tournaments/broadcast/broadcast_club.html @@ -31,8 +31,8 @@
Automatic | - - Programmation | + (beta) Tableau | + (beta) Programmation | Matchs | Poules | Convocations |