diff options
author | emkael <emkael@tlen.pl> | 2017-02-27 13:25:07 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-02-27 13:25:07 +0100 |
commit | 564b630b2699eb57524dd332c3bd4a0f910044ca (patch) | |
tree | 6aff7a559e170a5cff2e872e69197a81366365ef /playoff.py | |
parent | 94a98d21431d6ae03b81cf76c16c8ee3ce7f8b46 (diff) |
Filling matches from RR places
Diffstat (limited to 'playoff.py')
-rw-r--r-- | playoff.py | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -141,21 +141,26 @@ def get_match_info(match): elif isinstance(match['teams'][i], list): info.teams[i].name = '<br />'.join(match['teams'][i]) else: - teams = [] + match_teams = [] if 'winner' in match['teams'][i]: - teams += [ + match_teams += [ match_info[winner_match].winner for winner_match in match['teams'][i]['winner'] ] if 'loser' in match['teams'][i]: - teams += [ + match_teams += [ match_info[loser_match].loser for loser_match in match['teams'][i]['loser'] ] + if 'place' in match['teams'][i]: + match_teams += [ + teams[place-1][0] + for place in match['teams'][i]['place'] + ] info.teams[i].name = '<br />'.join([ team if team is not None else '??' - for team in teams] - ) if len([team for team in teams if team is not None]) > 0 else '' + for team in match_teams] + ) if len([team for team in match_teams if team is not None]) > 0 else '' try: towels = db_fetch(match['database'], p_sql.TOWEL_COUNT, (match['table'], match['round'])) |