Commit 5a760406 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: more assertion when creating a virtual master

parent 617a089b
......@@ -53,7 +53,9 @@ customer.newContent(
# Compute Node trade condition
if is_compute_node_payable:
source_section_value = subscription_request.getDestinationSectionValue()
source_section_value = subscription_request.getDestinationSectionValue(None)
if source_section_value is None:
raise AssertionError('No source section found to generate the invoices')
title = 'Payable Compute Node for: %s' % project.getTitle()
else:
source_section_value = None
......@@ -73,7 +75,9 @@ sale_trade_condition.validate()
# Instance Tree trade condition
if is_instance_tree_payable:
source_section_value = subscription_request.getDestinationSectionValue()
source_section_value = subscription_request.getDestinationSectionValue(None)
if source_section_value is None:
raise AssertionError('No source section found to generate the invoices')
title = 'Payable Instance Tree for: %s' % project.getTitle()
else:
source_section_value = None
......
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