Commit 56eeeeb9 authored by Julien Muchembled's avatar Julien Muchembled

BT: properly update activity dependencies to placeless default reindex rarameters

Previous code would have failed if 'activate_kw' was already present
(TypeError: ... got multiple values for keyword argument '...').
parent abf5dadc
...@@ -923,14 +923,13 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -923,14 +923,13 @@ class ObjectTemplateItem(BaseTemplateItem):
objects on which the uid was restored: previous object was deleted, objects on which the uid was restored: previous object was deleted,
hence the "deleted" path, and new object does have the same uid. hence the "deleted" path, and new object does have the same uid.
""" """
original_reindex_parameters = context.getPlacelessDefaultReindexParameters() kw = context.getPlacelessDefaultReindexParameters()
if original_reindex_parameters is None: if kw is None:
original_reindex_parameters = {} kw = {}
activate_kw = original_reindex_parameters.get('activate_kw', {}).copy() context.setPlacelessDefaultReindexParameters(**dict(kw,
activate_kw['after_method_id'] = 'unindexObject' activate_kw=dict(kw.get('activate_kw', ()),
context.setPlacelessDefaultReindexParameters(activate_kw=activate_kw, \ after_method_id='unindexObject')))
**original_reindex_parameters) return kw
return original_reindex_parameters
def _getObjectKeyList(self): def _getObjectKeyList(self):
# sort to add objects before their subobjects # sort to add objects before their subobjects
......
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