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, ...@@ -825,17 +825,19 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
if site_id is None: if site_id is None:
site_id = default_site site_id = default_site
out.write('<h1>Site: %s</h1>' % unquoteToHtml(site_id, encoding)) out.write('<h1>Site: %s</h1>' % unquoteToHtml(site_id, encoding))
out.write( apdex_data = data.getApdexData()
graphPair( if apdex_data:
prepareDataForGraph( out.write(
data.getApdexData(), graphPair(
prepareDataForGraph(
apdex_data,
date_format,
placeholder_delta,
),
date_format, date_format,
placeholder_delta, graph_period,
), )
date_format,
graph_period,
) )
)
out.write(data.asHTML(date_format, placeholder_delta, graph_period, out.write(data.asHTML(date_format, placeholder_delta, graph_period,
encoding, decimator)) encoding, decimator))
end_stat_time = time.time() 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