From ac0733c36b6200aecb2c738a549d00d7c2e6be98 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 6 Jul 2018 03:20:13 +0200 Subject: Storing finishing positions in DTO --- jfr_playoff/dto.py | 2 ++ jfr_playoff/matchinfo.py | 2 ++ 2 files changed, 4 insertions(+) (limited to 'jfr_playoff') 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): -- cgit v1.2.3