From cf35236dd998501d95f141a2ab487bbd5af05aa0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 5 Apr 2007 16:52:02 +0000
Subject: [PATCH] don't use hasattr for indexing

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13987 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Base.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py
index 9b0e3b7252..e9e922acfa 100644
--- a/product/ERP5Type/Base.py
+++ b/product/ERP5Type/Base.py
@@ -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)
-- 
2.30.9