From 14cb9abe6535dcc025b35a41a96d5c6942ab5dfa Mon Sep 17 00:00:00 2001 From: Laurent Date: Fri, 15 Mar 2024 22:26:45 +0100 Subject: [PATCH] Fix summons --- tournaments/models/team_registration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tournaments/models/team_registration.py b/tournaments/models/team_registration.py index 7dc0eaf..d26639d 100644 --- a/tournaments/models/team_registration.py +++ b/tournaments/models/team_registration.py @@ -42,8 +42,8 @@ class TeamRegistration(models.Model): matches = [m for m in all_matches if m.end_date is None] if matches: return matches[0] - elif all_matches: - return all_matches[0] + else: + return None def next_stage(self): matches = map(lambda ts: ts.match, self.teamscore_set.all())