Commit 42ba0167 authored by Yoshinori Okuji's avatar Yoshinori Okuji

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
parent 827ad6aa
...@@ -1632,7 +1632,8 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1632,7 +1632,8 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
""" """
Reindexes an object - also useful for testing 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()) #LOG("immediateReindexObject",0,self.getRelativeUrl())
PortalContent.reindexObject(self, *args, **kw) PortalContent.reindexObject(self, *args, **kw)
else: else:
...@@ -1648,9 +1649,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1648,9 +1649,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
Reindexes an object Reindexes an object
args / kw required since we must follow API args / kw required since we must follow API
""" """
root_indexable = int(getattr(self.getPortalObject(),'isIndexable',1)) self.activate(**kw).immediateReindexObject(*args, **kw)
if self.isIndexable and root_indexable:
self.activate(**kw).immediateReindexObject(*args, **kw)
security.declarePublic('recursiveReindexObject') security.declarePublic('recursiveReindexObject')
recursiveReindexObject = reindexObject recursiveReindexObject = reindexObject
......
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