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