From 42ba01679e76aa20872fc1dfe89788a15d2ae7d1 Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Thu, 7 Apr 2005 06:45:32 +0000 Subject: [PATCH] Check if an object is indexable in immediateReindexObject instead of reindexObject. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2839 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Base.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 1b5a3d28c2..50dd9d3ae3 100755 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -1632,7 +1632,8 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): """ Reindexes an object - also useful for testing """ - if self.isIndexable: + root_indexable = int(getattr(self.getPortalObject(),'isIndexable',1)) + if self.isIndexable and root_indexable: #LOG("immediateReindexObject",0,self.getRelativeUrl()) PortalContent.reindexObject(self, *args, **kw) else: @@ -1648,9 +1649,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): Reindexes an object args / kw required since we must follow API """ - root_indexable = int(getattr(self.getPortalObject(),'isIndexable',1)) - if self.isIndexable and root_indexable: - self.activate(**kw).immediateReindexObject(*args, **kw) + self.activate(**kw).immediateReindexObject(*args, **kw) security.declarePublic('recursiveReindexObject') recursiveReindexObject = reindexObject -- 2.30.9