Commit 167bb0ff authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Romain Courteaud

slapos_cloud: use getObject to unwrap compute node

parent 180d8979
...@@ -40,7 +40,7 @@ compute_node_list = portal.portal_catalog.portal_catalog( ...@@ -40,7 +40,7 @@ compute_node_list = portal.portal_catalog.portal_catalog(
if len(compute_node_list) == 2: if len(compute_node_list) == 2:
raise NotImplementedError raise NotImplementedError
elif len(compute_node_list) == 1: elif len(compute_node_list) == 1:
compute_node = compute_node_list[0] compute_node = compute_node_list[0].getObject()
assert compute_node.getFollowUp() == project_list[0].getRelativeUrl() assert compute_node.getFollowUp() == project_list[0].getRelativeUrl()
else: else:
...@@ -57,9 +57,6 @@ else: ...@@ -57,9 +57,6 @@ else:
) )
compute_node.approveComputeNodeRegistration() compute_node.approveComputeNodeRegistration()
compute_node = context.restrictedTraverse(compute_node.getRelativeUrl())
context.REQUEST.set("compute_node", compute_node.getRelativeUrl()) context.REQUEST.set("compute_node", compute_node.getRelativeUrl())
context.REQUEST.set("compute_node_url", compute_node.absolute_url()) context.REQUEST.set("compute_node_url", compute_node.absolute_url())
context.REQUEST.set("compute_node_reference", compute_node.getReference()) context.REQUEST.set("compute_node_reference", compute_node.getReference())
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