api: use empty strings for None labels (#35448)

This commit is contained in:
Frédéric Péters 2019-08-19 14:16:45 +02:00
parent d38873bdd4
commit b3839357a7
1 changed files with 1 additions and 1 deletions

View File

@ -301,7 +301,7 @@ class VisualizationJSONView(generics.GenericAPIView):
}
elif len(drilldowns) == 1:
table = list(visualization.data())
axis_data = [x[0]['value'].strip() for x in table]
axis_data = [(x[0]['value'] or '').strip() for x in table]
data = [x[1]['value'] for x in table]
if visualization.drilldown_x:
axis = {'x_labels': axis_data}