Commit 78efcb26 authored by Aurel's avatar Aurel

Avoid failure when calling hasData as Document object does not have

'data' property defined by default


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32281 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b8d33a47
......@@ -1276,7 +1276,7 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, S
using the base_data property. Refer to Document.py propertysheet.
Use accessors (getBaseData, setBaseData, hasBaseData, etc.)
"""
if not self.hasData():
if getattr(self, 'hasData', None) is not None and not self.hasData():
# Empty document cannot be converted
return #'Document is empty'
try:
......
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