summaryrefslogtreecommitdiff
path: root/jfr_playoff/generator.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-10-10 01:09:05 +0200
committeremkael <emkael@tlen.pl>2018-10-10 01:09:05 +0200
commitef9a1565fba727d05d4ebf91ef4a63f01b83f4bf (patch)
tree8372b1535a4b66f8ba9be651724cdbada8fbae5f /jfr_playoff/generator.py
parent8181571f14486be1d81dde08e8c7a088241f9fb7 (diff)
Backwards compatibility with legacy config structurenext-round-prognosis
Diffstat (limited to 'jfr_playoff/generator.py')
-rw-r--r--jfr_playoff/generator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py
index c78d5cb..898e5ed 100644
--- a/jfr_playoff/generator.py
+++ b/jfr_playoff/generator.py
@@ -95,6 +95,7 @@ class PlayoffGenerator(object):
team_label = [] # label is what's shown in the table cell
label_separator = self.team_box_settings.get('label_separator', ' / ')
label_placeholder = self.team_box_settings.get('label_placeholder', '??')
+ label_length_limit = self.team_box_settings.get('label_length_limit', self.page.get('label_length_limit', 0))
label_ellipsis = self.team_box_settings.get('label_ellipsis', '(...)')
team_name = [] # name is what's shown in the tooltip
name_separator = self.team_box_settings.get('name_separator', '<br />')
@@ -134,7 +135,7 @@ class PlayoffGenerator(object):
# fill any remaining empty labels (i.e. these which had empty predictions available) with placeholders
labels[l] = coalesce(labels[l], label_placeholder)
# shorten concatenated label to specified combined length
- labels = self.__shorten_labels(labels, self.team_box_settings.get('label_length_limit', 0), label_separator, label_ellipsis)
+ labels = self.__shorten_labels(labels, label_length_limit, label_separator, label_ellipsis)
PlayoffLogger.get('generator').info('shortened team labels: %s', labels)
for l in range(0, len(labels)):
# concatenate labels, assigning appropriate classes to predicted teams