From ad974801fe72b338b6af507385ddb8b689229269 Mon Sep 17 00:00:00 2001 From: Laurent Date: Sun, 23 Jun 2024 17:16:06 +0200 Subject: [PATCH] Fix crash --- tournaments/models/match.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tournaments/models/match.py b/tournaments/models/match.py index c8b5e69..fdd7f1d 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -149,7 +149,10 @@ class Match(models.Model): livematch = LiveMatch(title, date, duration, court, self.started(), ended) for team_score in self.sorted_team_scores(): - image = team_score.team_registration.logo + if team_score.team_registration.logo: + image = team_score.team_registration.logo + else: + image = None names = team_score.team_names() scores = team_score.scores_array() weight = team_score.team_registration.weight