Commit 0f6dc875 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: return after cancel the subscription request

parent 6de3c1bf
......@@ -29,9 +29,10 @@ if item is None:
raise ValueError('Unsupported resource: %s' % resource.getRelativeUrl())
if item.getValidationState() in ['invalidated', 'archived']:
subscription_request.cancel(
return subscription_request.cancel(
comment="%s is %s." % (item.getPortalType(), item.getValidationState()))
return markHistory(subscription_request,
'We cancelled your subscription request, the related instance was destroyed, invalidated or archived.')
# If the virtual master is not in the expected subscription status,
# do not accept any new service (compute node, instance) for it
......
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