Commit 780ac8aa authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: do not crash if subscription could not be created anymore

parent 696e5d33
...@@ -62,6 +62,7 @@ if 0 < total_price: ...@@ -62,6 +62,7 @@ if 0 < total_price:
else: else:
project = subscription_request.getSourceProjectValue() project = subscription_request.getSourceProjectValue()
try:
subscription_change_request = subscription_request.getResourceValue().Resource_createSubscriptionRequest( subscription_change_request = subscription_request.getResourceValue().Resource_createSubscriptionRequest(
subscription_request.getDestinationValue(), subscription_request.getDestinationValue(),
# [software_type, software_release], # [software_type, software_release],
...@@ -72,6 +73,9 @@ if 0 < total_price: ...@@ -72,6 +73,9 @@ if 0 < total_price:
item_value=item, item_value=item,
causality_value=subscription_request.getCausalityValue() causality_value=subscription_request.getCausalityValue()
) )
except AssertionError:
pass
else:
if subscription_change_request.getSpecialise() != subscription_request.getSpecialise(): if subscription_change_request.getSpecialise() != subscription_request.getSpecialise():
# We have a matching Trade Condition. # We have a matching Trade Condition.
# We can recreate the Subscription Request # We can recreate the Subscription Request
......
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