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

Change the way to test if the style is dynamic in something better. The

current way was hiding AttributeError that may be raised while rendering this
style.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23764 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 46e9a275
......@@ -456,11 +456,9 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0">
format = request.get('format')
try:
# If style is dynamic, call it
try:
if getattr(aq_base(ooo_document), '__call__', None) is not None:
request.set('format', None)
ooo_document = ooo_document()
except AttributeError:
pass
finally:
request.set('format', format)
# Create a new builder instance
......
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