Commit e3c67d8a authored by Ivan Tyagov's avatar Ivan Tyagov

Explicitly check if hasData do exists. As Document is an abstract class such a...

Explicitly check if hasData do exists. As Document is an abstract class such a check should be avoided and all inheriting classes should implement the standard hasBaseData method.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32851 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fab37d81
......@@ -985,7 +985,7 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, S
Based on the document content, find out as many properties as needed.
returns properties which should be set on the document
"""
if not self.hasData():
if getattr(self, 'hasData', None) is not None and not self.hasData():
# if document is empty, we will not find anything in its content
return dict()
if not self.hasBaseData():
......
......@@ -31,7 +31,7 @@ from Products.ERP5Type.XMLObject import XMLObject
class Gadget(XMLObject):
"""
An Gadget object holds a template information for an ERP5 Gadget part of ERP5 UI).
An Gadget object holds a template information for an ERP5 Gadget (part of ERP5 UI).
"""
meta_type = 'ERP5 Gadget'
......
......@@ -414,7 +414,7 @@ class Image(File, OFSImage):
parameter_list.append('%s:-' % format)
else:
parameter_list.append('-')
#self.log(parameter_list)
process = subprocess.Popen(parameter_list,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
......
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