Commit ccb82aae authored by Aurel's avatar Aurel

propagate default activate_kw from parent to child objects


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16265 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3b4e308d
......@@ -121,7 +121,7 @@ class CopyContainer:
if changed != 0:
object.setCategoryList(category_list)
def _recursiveSetActivityAfterTag(self, obj):
def _recursiveSetActivityAfterTag(self, obj, activate_kw=None):
"""
Make sure to set an after tag on each object
so that it is possible to unindex before doing
......@@ -129,6 +129,7 @@ class CopyContainer:
"""
uid = getattr(aq_base(obj), 'uid', None)
if uid is not None:
if activate_kw is None:
activate_kw = obj.getDefaultActivateParameterDict()
try:
activate_kw["after_tag"] = str(uid)
......@@ -136,7 +137,7 @@ class CopyContainer:
activate_kw = {"after_tag":str(uid),}
obj.setDefaultActivateParameters(**activate_kw)
for sub_obj in obj.objectValues():
self._recursiveSetActivityAfterTag(sub_obj)
self._recursiveSetActivityAfterTag(sub_obj, activate_kw)
security.declareProtected( Permissions.ModifyPortalContent, 'manage_renameObject' )
def manage_renameObject(self, id=None, new_id=None, REQUEST=None):
......
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