From f8c1ce027cc681f9b568b459bd0ca85a317a4982 Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 5 Feb 2025 09:58:02 +0100 Subject: [PATCH] fix issue where group stages were displayed despite tournament having none --- tournaments/models/tournament.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index e0fc064..08d7c4f 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -839,10 +839,10 @@ class Tournament(models.Model): return False def display_group_stages(self): - if self.end_date is not None: - return True if len(self.groupstage_set.all()) == 0: return False + if self.end_date is not None: + return True if self.publish_group_stages: return True