Commit ec2edfa3 authored by Jérome Perrin's avatar Jérome Perrin

Don't assume that extra_context will contain an "options" dictionnary


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17337 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fc5c3311
......@@ -461,9 +461,9 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0">
self.OLE_documents_zipstring = None
# Convert if necessary
opts = extra_context.get("options", None)
opts = extra_context.get("options", dict())
# Get request and batch_mode
# Get batch_mode
batch_mode = opts.get('batch_mode', None)
# If the file has embedded OLE documents, restore it
......@@ -478,7 +478,6 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0">
# Produce final result
ooo = ooo_builder.render(name=self.title or self.id)
if opts is not None:
format = opts.get('format', request.get('format', None))
if format:
return self._asFormat(ooo, format, request, batch_mode)
......
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