chart data corrected

parent afc6fac1
......@@ -60,7 +60,7 @@ def report_L2ASCL(request, report,purchase_id):
# item['fill'] = "false"
if l == "0":
item['hidden'] = "true"
item['data'] = [v[l] * 60 * 60 / 1000000. for k, v in sorted(json_data.items()) if l in v]
item['data'] = [v[l] * 60 * 60 / 1000000. if (l in v) else 0 for k, v in sorted(json_data.items())]
item['backgroundColor'] = colors[int(l)]
data['datasets'].append(item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment