Commit 87b48f7e authored by Vincent Pelletier's avatar Vincent Pelletier

Previous use of serialization_tag was not enough to prevent indexation...

Previous use of serialization_tag was not enough to prevent indexation concurency problems. Apply the original code. Though it does not use a clean way to check document level, it works.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19529 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 57876fc8
......@@ -2713,12 +2713,31 @@ class Base( CopyContainer,
self.activate(group_method_id='portal_catalog/catalogObjectList',
alternate_method_id='alternateReindexObject',
group_id=group_id,
serialization_tag=self.getPath() + '%',
serialization_tag=self.getRootDocument(),
**activate_kw).immediateReindexObject(**kw)
security.declarePublic('recursiveReindexObject')
recursiveReindexObject = reindexObject
def getRootDocument(self):
result = self.getRootDocumentValue()
if result is not None:
result = result.getPath()
return result
def getRootDocumentValue(self):
result = None
parent_value = self.getParentValue()
if parent_value is not None:
parent_id = parent_value.getId()
if parent_id.endswith('_module') or parent_id.startswith('portal_'):
result = self
else:
getRootDocumentValue = getattr(parent_value, 'getRootDocumentValue', None)
if getRootDocumentValue is not None:
result = getRootDocumentValue()
return result
security.declareProtected( Permissions.AccessContentsInformation, 'getIndexableChildValueList' )
def getIndexableChildValueList(self):
"""
......
......@@ -1101,7 +1101,7 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
expand_method_id='getIndexableChildValueList',
alternate_method_id='alternateReindexObject',
group_id=group_id,
serialization_tag=self.getPath() + '%',
serialization_tag=self.getRootDocument(),
**activate_kw).recursiveImmediateReindexObject(**kw)
security.declareProtected( Permissions.AccessContentsInformation,
......
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