Commit e89b1773 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix a crash when there is no apdex data.

This can happen when all hits are detected as "no_module" for ERP5 stats.
parent 5b5e7bcf
......@@ -825,17 +825,19 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
if site_id is None:
site_id = default_site
out.write('<h1>Site: %s</h1>' % unquoteToHtml(site_id, encoding))
out.write(
graphPair(
prepareDataForGraph(
data.getApdexData(),
apdex_data = data.getApdexData()
if apdex_data:
out.write(
graphPair(
prepareDataForGraph(
apdex_data,
date_format,
placeholder_delta,
),
date_format,
placeholder_delta,
),
date_format,
graph_period,
graph_period,
)
)
)
out.write(data.asHTML(date_format, placeholder_delta, graph_period,
encoding, decimator))
end_stat_time = time.time()
......
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