diff options
author | emkael <emkael@tlen.pl> | 2020-01-30 22:10:05 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2020-01-30 22:10:05 +0100 |
commit | c91b2e966450377b01f83b9cde87b54807803bff (patch) | |
tree | b5a36e260583151f6bde0e87bc7c4d12e6e9134a /jfr_playoff/data | |
parent | 703e549737d74191dc4487e9afc67f80e70704de (diff) |
Correctly determining match outcome (winner/loser) if teams are defined via 'selected' property and scores are manual
Diffstat (limited to 'jfr_playoff/data')
-rw-r--r-- | jfr_playoff/data/info.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |