@ -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())