Commit d7ffbddc authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: cleanup request when instance is not subscribed yet

parent 6a0ccc4d
......@@ -3,6 +3,8 @@ portal = requester_instance.getPortalObject()
# Get required arguments
kwargs = state_change.kwargs
context.REQUEST.set('request_instance', None)
# Required args
# Raise TypeError if all parameters are not provided
try:
......
......@@ -94,6 +94,7 @@ else:
subscription_state = request_instance_tree.Service_getSubscriptionStatus()
request_instance_tree.log('subscription_state %s' % subscription_state)
if subscription_state in ('not_subscribed', 'nopaid'):
context.REQUEST.set('request_instance', None)
pass
elif subscription_state in ('subscribed', 'todestroy'):
request_instance_tree.requestInstance(
......
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