Commit 3a57e62e authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Fix a bug in the graphs/index controller: the format is given by the page extension.

parent 8d1a9ae4
...@@ -87,5 +87,7 @@ def index(): ...@@ -87,5 +87,7 @@ def index():
do_title(ax, db, selector) do_title(ax, db, selector)
# delegate the rendering to the view # delegate the rendering to the view
fmt = "svg" if selector.format == "html" else selector.format extension = request.extension
fmt = "svg" if extension == "html" else extension
return dict(data=savefig(ax.get_figure(), fmt)) return dict(data=savefig(ax.get_figure(), fmt))
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