summaryrefslogtreecommitdiff
path: root/jfr_playoff/generator.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-10-01 14:54:58 +0200
committeremkael <emkael@tlen.pl>2018-10-01 14:54:58 +0200
commit6f147d1b37de5c12b77c51ca2f80031cbec6ae20 (patch)
treee129a9e870043a1f659770baf757226c41765952 /jfr_playoff/generator.py
parent72e52cf8c572f262d022acaa1eb1aa65bccb099e (diff)
Refactoring team name list in matches as actual list
Diffstat (limited to 'jfr_playoff/generator.py')
-rw-r--r--jfr_playoff/generator.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py
index d358d86..a1b519e 100644
--- a/jfr_playoff/generator.py
+++ b/jfr_playoff/generator.py
@@ -55,23 +55,23 @@ class PlayoffGenerator(object):
for team in match.teams:
score_html = self.p_temp.get('MATCH_SCORE', team.score)
team_label = ' / '.join([
- self.data.get_shortname(name) for name in
- team.name.split('<br />')])
+ self.data.get_shortname(name) for name in team.name])
+ team_name = '<br />'.join(team.name)
label_max_length = self.page.get('label_length_limit', 0)
if label_max_length:
team_label = team_label[:label_max_length] + (team_label[label_max_length:] and '(...)')
team_html = self.p_temp.get(
'MATCH_TEAM_LINK',
- match.link, team.name, team_label) \
+ match.link, team_name, team_label) \
if match.link is not None \
else self.p_temp.get(
'MATCH_TEAM_NON_LINK',
- team.name, team_label)
+ team_name, team_label)
rows += self.p_temp.get(
'MATCH_TEAM_ROW',
' '.join([
- 'winner' if team.name == match.winner else '',
- 'loser' if team.name == match.loser else ''
+ 'winner' if match.winner in team.name else '',
+ 'loser' if match.loser in team.name else ''
]).strip(),
team_html,
self.p_temp.get(