Commit 47e93076 authored by Sebastien Robin's avatar Sebastien Robin

do not call flushActivity

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11355 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c5fe849b
...@@ -1077,13 +1077,9 @@ class Base( CopyContainer, ...@@ -1077,13 +1077,9 @@ class Base( CopyContainer,
""" """
changes id of an object by calling the Zope machine changes id of an object by calling the Zope machine
""" """
# Do not rename until everything flushed
self.recursiveFlushActivity(invoke=1)
tryMethodCallWithTemporaryPermission(self, 'Copy or Move', tryMethodCallWithTemporaryPermission(self, 'Copy or Move',
self.aq_inner.aq_parent.manage_renameObject, (self.id, id), {}, CopyError) self.aq_inner.aq_parent.manage_renameObject, (self.id, id), {}, CopyError)
if reindex: # Do not flush any more, because it generates locks
# Required if we wish that news ids appear instantly
self.flushActivity(invoke=1)
security.declareProtected( Permissions.ModifyPortalContent, security.declareProtected( Permissions.ModifyPortalContent,
'updateRelatedContent' ) 'updateRelatedContent' )
...@@ -1995,8 +1991,9 @@ class Base( CopyContainer, ...@@ -1995,8 +1991,9 @@ class Base( CopyContainer,
def _reindexObject(self, *args, **kw): def _reindexObject(self, *args, **kw):
# When the activity supports group methods, portal_catalog/catalogObjectList is called instead of # When the activity supports group methods, portal_catalog/catalogObjectList is called instead of
# immediateReindexObject. # immediateReindexObject.
root_indexable = int(getattr(self.getPortalObject(),'isIndexable',1)) # Do not check if root is indexable, it is done into catalogObjectList,
if self.isIndexable and root_indexable: # so we will save time
if self.isIndexable:
self.activate(group_method_id='portal_catalog/catalogObjectList', alternate_method_id='alternateReindexObject', **kw).immediateReindexObject(*args, **kw) self.activate(group_method_id='portal_catalog/catalogObjectList', alternate_method_id='alternateReindexObject', **kw).immediateReindexObject(*args, **kw)
security.declarePublic('recursiveReindexObject') security.declarePublic('recursiveReindexObject')
......
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