Commit f8ac430a authored by Julien Muchembled's avatar Julien Muchembled

Fix 2 bugs about default reindexing parameters

- do not alter default parameters when accessing them
- make explicit parameters take precedence over default,
  similarly to activate_kw
parent e7bcf7ea
No related merge requests found
......@@ -2737,14 +2737,12 @@ class Base( CopyContainer,
reindex_kw = self.getDefaultReindexParameterDict()
if reindex_kw is not None:
reindex_activate_kw = reindex_kw.pop('activate_kw', None)
if reindex_activate_kw is not None:
reindex_activate_kw = reindex_activate_kw.copy()
if activate_kw is not None:
# activate_kw parameter takes precedence
reindex_kw = reindex_kw.copy()
reindex_activate_kw = reindex_kw.pop('activate_kw', None) or {}
reindex_activate_kw.update(activate_kw)
reindex_kw.update(kw)
kw = reindex_kw
activate_kw = reindex_activate_kw
kw.update(reindex_kw)
group_id_list = []
if kw.get("group_id", "") not in ('', None):
......
......@@ -1291,14 +1291,12 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn):
reindex_kw = self.getDefaultReindexParameterDict()
if reindex_kw is not None:
reindex_activate_kw = reindex_kw.pop('activate_kw', None)
if reindex_activate_kw is not None:
reindex_activate_kw = reindex_activate_kw.copy()
if activate_kw is not None:
# activate_kw parameter takes precedence
reindex_kw = reindex_kw.copy()
reindex_activate_kw = reindex_kw.pop('activate_kw', None) or {}
reindex_activate_kw.update(activate_kw)
reindex_kw.update(kw)
kw = reindex_kw
activate_kw = reindex_activate_kw
kw.update(reindex_kw)
group_id_list = []
if kw.get("group_id", "") not in ('', 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