Skip to content

Commit

Permalink
[title] Fix issue with non-string names in series title (apache#5433)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4e3b2e7)
  • Loading branch information
john-bodley authored and John Bodley committed Aug 15, 2018
1 parent d49a0e7 commit 60a1218
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,11 +1389,9 @@ def get_data(self, df):
continue
if isinstance(name, string_types):
series_title = name
elif len(self.metrics) > 1:
series_title = ', '.join(name)
else:
l = [str(s) for s in name[1:]] # noqa: E741
series_title = ', '.join(l)
offset = 0 if len(metrics) > 1 else 1
series_title = ', '.join([text_type(s) for s in name[offset:]])
values = []
for i, v in ys.iteritems():
x = i
Expand Down

0 comments on commit 60a1218

Please sign in to comment.