Skip to content

Commit

Permalink
Merge pull request #225 from vladaspasic/master
Browse files Browse the repository at this point in the history
Convert dimension values to an Iterable
  • Loading branch information
twheys committed Mar 4, 2019
2 parents 64a0d53 + 2dbae6a commit bab9e0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fireant/slicer/widgets/helpers.py
Expand Up @@ -70,10 +70,13 @@ def render_series_label(dimension_values, metric=None, reference=None):
a tuple of dimension values. Can be zero-length or longer.
:return:
"""
# normalize the dimension values, as we expect them to be an iterable, in
# order to calculate the number of used dimension safely
dimension_values = utils.wrap_list(dimension_values)

num_used_dimensions = len(dimensions) - len(dimension_values)
used_dimensions = dimensions[num_used_dimensions:]

dimension_values = utils.wrap_list(dimension_values)
dimension_labels = [utils.getdeepattr(dimension_display_values,
(utils.format_dimension_key(dimension.key), dimension_value),
dimension_value)
Expand Down

0 comments on commit bab9e0c

Please sign in to comment.