Commit aca9540d authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: assert trade_condition_type are the same

parent 51431573
......@@ -57,6 +57,9 @@ tmp_sale_order.SaleOrder_applySaleTradeCondition(batch_mode=1, force=1)
if tmp_sale_order.getSpecialise(None) is None:
raise AssertionError('Can not find a trade condition to generate the Subscription Request')
if tmp_sale_order.getTradeConditionType() != tmp_sale_order.getSpecialiseValue().getTradeConditionType():
raise AssertionError('Unexpected different trade_condition_type: %s %s' % (tmp_sale_order.getTradeConditionType(), tmp_sale_order.getSpecialiseValue().getTradeConditionType()))
if currency_value is not None:
if currency_value.getRelativeUrl() != tmp_sale_order.getPriceCurrency():
raise AssertionError('Unexpected different currency: %s %s' % (currency_value.getRelativeUrl(), tmp_sale_order.getPriceCurrency()))
......
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