diff options
Diffstat (limited to 'jfr_playoff/generator.py')
-rw-r--r-- | jfr_playoff/generator.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py index 479f33b..bb18bb9 100644 --- a/jfr_playoff/generator.py +++ b/jfr_playoff/generator.py @@ -124,10 +124,15 @@ class PlayoffGenerator(object): return html def get_swiss_links(self): - return '\n'.join([ - p_temp.SWISS_LINK % ( - event['link'], event['position'] - ) for event in self.data.get_swiss_info()]) + info = [] + for event in self.data.get_swiss_info(): + event_label = p_temp.SWISS_DEFAULT_LABEL % (event['position']) + if 'label' in event and event['label'] is not None: + event_label = event['label'] + info.append(p_temp.SWISS_LINK % ( + event['link'], event_label + )) + return '\n'.join(info) def get_flag(self, team): flag = self.data.get_team_image(team) |