Commit 80a80f4b authored by Nicolas Delaby's avatar Nicolas Delaby

Be more tolerant against previous implementation

Done by JPS


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41704 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6d5c79d2
......@@ -114,13 +114,18 @@ class DownloadableMixin:
"""Returns the document coordinates as a standard file name. This
method is the reverse of getPropertyDictFromFileName.
"""
method = self._getTypeBasedMethod('getStandardFilename',
try:
method = self._getTypeBasedMethod('getStandardFilename',
fallback_script_id='Document_getStandardFilename')
if method is None:
except AttributeError:
# backward compatibility
method = self._getTypeBasedMethod('getStandardFileName',
fallback_script_id='Document_getStandardFileName')
return method(format=format)
try:
return method(format=format)
except TypeError:
# Old versions of this script did not support 'format' parameter
return method()
# backward compatibility
security.declareProtected(Permissions.AccessContentsInformation,
......
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