Skip to content
Snippets Groups Projects
Commit 7214cd01 authored by Julian Rother's avatar Julian Rother
Browse files

Handle empty x-values in generic stats

parent 3e49083d
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,10 @@ def stats_generic(req, param=None):
rows = query(statsqueries[req], *(statsqueries[req].count('?')*[param]))
res = {'x':[], 'y':[]}
for row in rows:
if row['x'] != '':
res['x'].append(row['x'])
else:
res['x'].append('leer')
res['y'].append(row['y'])
return Response(json.dumps(res, default=plotly_date_handler), mimetype='application/json')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment