Commit d5581972 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

slapos_cloud: use getObject to unwrap compute node

parent d05a06d3
...@@ -23,7 +23,7 @@ compute_node_list = portal.portal_catalog.portal_catalog(portal_type=compute_nod ...@@ -23,7 +23,7 @@ compute_node_list = portal.portal_catalog.portal_catalog(portal_type=compute_nod
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()
else: else:
compute_node = None compute_node = None
...@@ -41,9 +41,6 @@ if compute_node is None: ...@@ -41,9 +41,6 @@ if compute_node is None:
compute_node.requestComputeNodeRegistration() compute_node.requestComputeNodeRegistration()
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