Commit 4423aee4 authored by Nicolas Delaby's avatar Nicolas Delaby

small improvement to avoid usage of hasattr

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35219 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e126ce85
...@@ -995,9 +995,9 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, S ...@@ -995,9 +995,9 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, S
set on the document by ContributionTool.newContent as soon set on the document by ContributionTool.newContent as soon
as the document was created. as the document was created.
""" """
if hasattr(self, '_backup_input'): kw = getattr(self, '_backup_input', {})
return getattr(self, '_backup_input') if kw:
kw = {} return kw
for id in self.propertyIds(): for id in self.propertyIds():
# We should not consider file data # We should not consider file data
if id not in ('data', 'categories_list', 'uid', 'id', if id not in ('data', 'categories_list', 'uid', 'id',
......
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