Commit 617a089b authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: show the issue when it is not possible to add a virtual master

parent 55fd0136
...@@ -14,7 +14,19 @@ project.validate() ...@@ -14,7 +14,19 @@ project.validate()
currency_value = portal.restrictedTraverse(price_currency) currency_value = portal.restrictedTraverse(price_currency)
# create the subscription request, which will lead to the Open Order # create the subscription request, which will lead to the Open Order
subscription_request = resource.Resource_createSubscriptionRequest(customer, [], project, currency_value=currency_value) try:
subscription_request = resource.Resource_createSubscriptionRequest(customer, [], project, currency_value=currency_value)
except AssertionError, e:
if batch:
raise
return context.Base_redirect(
keep_items={
'portal_status_level': 'error',
'portal_status_message': str(e)
},
abort_transaction=True,
)
# XXX How to specify the trade condition containing the currency and trade model lines? # XXX How to specify the trade condition containing the currency and trade model lines?
specialise_value = subscription_request.getSpecialiseValue(portal_type="Sale Trade Condition") specialise_value = subscription_request.getSpecialiseValue(portal_type="Sale Trade Condition")
......
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