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

don't use hasattr for indexing


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13987 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0ce5aeff
......@@ -104,8 +104,8 @@ class WorkflowMethod(Method):
except ObjectDeleted, ex:
res = ex.getResult()
else:
if hasattr(aq_base(instance), 'reindexObject'):
instance.reindexObject()
if getattr((aq_base(instance), 'reindexObject', None) is not None:
instance.reindexObject()
else:
res = wf.wrapWorkflowMethod(instance, self._id, self.__dict__['_m'],
(instance,) + args, kw)
......
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