From c91b2e966450377b01f83b9cde87b54807803bff Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 30 Jan 2020 22:10:05 +0100 Subject: Correctly determining match outcome (winner/loser) if teams are defined via 'selected' property and scores are manual --- jfr_playoff/data/info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'jfr_playoff/data') diff --git a/jfr_playoff/data/info.py b/jfr_playoff/data/info.py index f79499b..942e8fb 100644 --- a/jfr_playoff/data/info.py +++ b/jfr_playoff/data/info.py @@ -206,10 +206,10 @@ class MatchInfo(ResultInfo): match_teams = [None] * len(placed_teams) teams[i].name = match_teams teams[i].possible_name = possible_teams - teams[i].known_teams = len([ - team for team in match_teams if team is not None]) teams[i].selected_team = self.config['selected_teams'][i] \ if 'selected_teams' in self.config else -1 + teams[i].known_teams = 1 if teams[i].selected_team >= 0 else len([ + team for team in match_teams if team is not None]) PlayoffLogger.get('matchinfo').info( 'config scores for match #%d: %s', self.info.id, teams) -- cgit v1.2.3