From bf51c20058768bcbc877ca8140bd2ce7326ae56b Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Wed, 29 May 2024 16:52:46 +0200 Subject: [PATCH] hide disabled match --- tournaments/models/match.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tournaments/models/match.py b/tournaments/models/match.py index 1e446e0..7ff1151 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -114,7 +114,9 @@ class Match(models.Model): return False def should_appear(self): - if self.group_stage is None: + if self.disabled: + return False + elif self.group_stage is None: return (self.start_date or self.end_date) and len(self.team_scores.all()) > 0 else: return len(self.team_scores.all()) > 0