From 79a88264e618d8287ddfbea4f12ccd216a127646 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Wed, 29 May 2024 17:55:36 +0200 Subject: [PATCH] fix hide empty matches --- tournaments/models/tournament.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 529161c..597b1a5 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -292,7 +292,8 @@ class Tournament(models.Model): if matches: round_matches = round.match_set.all() - round_matches = [m for m in round_matches if m.should_appear()] + if hide_empty_matches: + round_matches = [m for m in round_matches if m.should_appear()] group = self.create_match_group(round.name(), round_matches, broadcasted) groups.append(group)