From 59a7c989c4266205438ddb9a03e71aa2a21886c8 Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 12 Jan 2019 16:52:31 +0100 Subject: Show leaderboard style captions if finishing position indicators are enabled --- jfr_playoff/generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jfr_playoff/generator.py') diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py index 8bdb2d8..1726a01 100644 --- a/jfr_playoff/generator.py +++ b/jfr_playoff/generator.py @@ -47,7 +47,7 @@ class PlayoffGenerator(object): match_grid, self.get_swiss_links(), leaderboard_table, - self.get_leaderboard_caption_table() if leaderboard_table else '', + self.get_leaderboard_caption_table() if leaderboard_table or self.page['finishing_position_indicators'] else '', self.p_temp.get( 'PAGE_BODY_FOOTER', datetime.now().strftime('%Y-%m-%d o %H:%M:%S')))) -- cgit v1.2.3 From 9f39d6fec5ede281664be6e0566aac14d5970f0b Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 12 Jan 2019 17:14:15 +0100 Subject: Showing certain teams header only if there are any --- jfr_playoff/generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jfr_playoff/generator.py') diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py index 1726a01..36fa43c 100644 --- a/jfr_playoff/generator.py +++ b/jfr_playoff/generator.py @@ -162,7 +162,7 @@ class PlayoffGenerator(object): if len(team_name) != known_teams: # we've added some predicted team names, so we add a header team_name.insert(known_teams, self.p_temp.get('MATCH_POSSIBLE_TEAM_LIST_HEADER')) - if (len(team_label) > 1) and (match.running == 0): + if (len(team_label) > 1) and (match.running == 0) and (known_teams > 0): # and we add a header for matches that haven't started yet and have multiple options for teams team_name.insert(0, self.p_temp.get('MATCH_TEAM_LIST_HEADER')) # glue it all together -- cgit v1.2.3