Commit a22232ef authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_upgrader: pass activate_kw to ActiveProcess's constructor

FullUpgrade Alarm relies on getLastActiveProcess to return results, which makes
use of the catalog to return a result. If the Active Processes spawned by the
3 Alarms composing the upgrader (pre, upgrade, post) are not indexed before
the FullUpgrade Alarm collects the results, then the wrong active result is
returned, which then give the wrong feedback to the user.

It seems that the "defaultActivateParameterDict" method cannot overwrite
the "tag" parameter of indexation activities (even if it was working for
after_tag). This is why this commit is needed.
parent 1bc87627
......@@ -4,7 +4,7 @@
activate_kw = params or {}
with context.defaultActivateParameterDict(activate_kw, placeless=True):
active_process = context.newActiveProcess()
active_process = context.newActiveProcess(activate_kw=activate_kw)
context.ERP5Site_checkUpgraderConsistency(fixit=fixit,
activate_kw=activate_kw,
......
......@@ -4,7 +4,7 @@
activate_kw = params or {}
with context.defaultActivateParameterDict(activate_kw, placeless=True):
active_process = context.newActiveProcess()
active_process = context.newActiveProcess(activate_kw=activate_kw)
context.ERP5Site_checkUpgraderConsistency(fixit=fixit,
activate_kw=activate_kw,
......
......@@ -17,7 +17,7 @@ if tool_portal_type in portal_type_list:
activate_kw = params or {}
with context.defaultActivateParameterDict(activate_kw, placeless=True):
active_process = context.newActiveProcess()
active_process = context.newActiveProcess(activate_kw=activate_kw)
method_kw = {'fixit': fixit,
'filter': {"constraint_type": 'upgrader'},
......
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