diff options
author | emkael <emkael@tlen.pl> | 2018-07-06 03:20:13 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-07-06 03:20:13 +0200 |
commit | ac0733c36b6200aecb2c738a549d00d7c2e6be98 (patch) | |
tree | d3d14476befe832cfad0a0e9a8c3378e2c3073eb | |
parent | 1e3d4e3233a9d01a81525255ed0f1479a96c1e5d (diff) |
Storing finishing positions in DTO
-rw-r--r-- | jfr_playoff/dto.py | 2 | ||||
-rw-r--r-- | jfr_playoff/matchinfo.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/jfr_playoff/dto.py b/jfr_playoff/dto.py index fa22265..1bc153c 100644 --- a/jfr_playoff/dto.py +++ b/jfr_playoff/dto.py @@ -31,6 +31,8 @@ class Match(object): loser = None winner_matches = None loser_matches = None + winner_place = None + loser_place = None def __repr__(self): return (u'#%d (%s) %s [%s]' % ( diff --git a/jfr_playoff/matchinfo.py b/jfr_playoff/matchinfo.py index 5a31577..a7c4064 100644 --- a/jfr_playoff/matchinfo.py +++ b/jfr_playoff/matchinfo.py @@ -32,6 +32,8 @@ class MatchInfo: self.info.loser_matches += self.config['teams'][i]['loser'] self.info.winner_matches = list(set(self.info.winner_matches)) self.info.loser_matches = list(set(self.info.loser_matches)) + self.info.winner_place = self.config['winner'] if 'winner' in self.config else [] + self.info.loser_place = self.config['loser'] if 'loser' in self.config else [] self.info.teams = [] def __fetch_match_link(self): |