Commit 40affc42 authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: reindex with activate_kw the object modified by the alarms

parent 3c0ac6da
...@@ -2,6 +2,7 @@ portal = context.getPortalObject() ...@@ -2,6 +2,7 @@ portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate( portal.portal_catalog.searchAndActivate(
method_id='SubscriptionChangeRequest_validateIfSubmitted', method_id='SubscriptionChangeRequest_validateIfSubmitted',
method_kw={'activate_kw': {'tag': tag}},
# Project are created only from UI for now # Project are created only from UI for now
portal_type=["Subscription Change Request"], portal_type=["Subscription Change Request"],
simulation_state='submitted', simulation_state='submitted',
......
...@@ -2,6 +2,7 @@ portal = context.getPortalObject() ...@@ -2,6 +2,7 @@ portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate( portal.portal_catalog.searchAndActivate(
method_id='SubscriptionRequest_validateIfSubmitted', method_id='SubscriptionRequest_validateIfSubmitted',
method_kw={'activate_kw': {'tag': tag}},
# Project are created only from UI for now # Project are created only from UI for now
portal_type=["Subscription Request"], portal_type=["Subscription Request"],
simulation_state='submitted', simulation_state='submitted',
......
...@@ -9,6 +9,8 @@ portal = context.getPortalObject() ...@@ -9,6 +9,8 @@ portal = context.getPortalObject()
assert subscription_change_request.getPortalType() == 'Subscription Change Request' assert subscription_change_request.getPortalType() == 'Subscription Change Request'
assert subscription_change_request.getSimulationState() == 'submitted' assert subscription_change_request.getSimulationState() == 'submitted'
subscription_change_request.reindexObject(activate_kw=activate_kw)
def invalidate(document, comment): def invalidate(document, comment):
context.validate() context.validate()
context.invalidate(comment=comment) context.invalidate(comment=comment)
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value> <value> <string>REQUEST=None, activate_kw=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -7,6 +7,8 @@ portal = context.getPortalObject() ...@@ -7,6 +7,8 @@ portal = context.getPortalObject()
assert subscription_request.getPortalType() == 'Subscription Request' assert subscription_request.getPortalType() == 'Subscription Request'
assert subscription_request.getSimulationState() == 'submitted' assert subscription_request.getSimulationState() == 'submitted'
subscription_request.reindexObject(activate_kw=activate_kw)
def markHistory(document, comment): def markHistory(document, comment):
portal_workflow = document.portal_workflow portal_workflow = document.portal_workflow
last_workflow_item = portal_workflow.getInfoFor(ob=document, last_workflow_item = portal_workflow.getInfoFor(ob=document,
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value> <value> <string>REQUEST=None, activate_kw=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
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