Commit 2b3dea5e authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: source_administration is not used anymore on Compute Node

parent d943b45e
......@@ -35,7 +35,6 @@ else:
# informative.
if compute_node.getReference() == reference:
aggregate_value_list = [compute_node]
person = compute_node.getSourceAdministrationValue(portal_type="Person")
project = compute_node_project
else:
project = None # For now, else we should calculate this too.
......@@ -71,6 +70,7 @@ else:
portal_type="Person")
except:
raise ValueError(instance.getRelativeUrl())
person_relative_url = person.getRelativeUrl()
aggregate_value_list = [partition, instance, subscription]
......@@ -79,21 +79,20 @@ else:
quantity=movement['quantity'],
aggregate_value_list=aggregate_value_list,
resource=movement['resource'],
person=person.getRelativeUrl(),
person=person_relative_url,
project=project
)
)
# Time to create the PL
person = compute_node.getSourceAdministrationValue(portal_type="Person")
delivery_template = portal.restrictedTraverse(
portal.portal_preferences.getPreferredInstanceDeliveryTemplate())
delivery = delivery_template.Base_createCloneDocument(batch_mode=1)
delivery.edit(
title=delivery_title,
destination=person.getRelativeUrl(),
destination_decision=person.getRelativeUrl(),
#destination=person.getRelativeUrl(),
#destination_decision=person.getRelativeUrl(),
start_date=context.getCreationDate(),
)
......
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