Commit fb82f212 authored by Loic Baron's avatar Loic Baron
Browse files

Slice.addLease handle lease without testbed attribute

parent fbcfd718
......@@ -85,7 +85,8 @@ class Slice(Entity):
def addLease(self, lease):
self.appendAttribute('leases', lease.getAttributes())
if lease.getAttribute('testbed') not in self.getAttribute('testbeds'):
#self.addResources(list(set(lease.getAttribute('resources')) - set(self.getAttribute('resources'))))
if lease.hasAttribute('testbed') and lease.getAttribute('testbed') not in self.getAttribute('testbeds'):
self.appendAttribute('testbeds', lease.getAttribute('testbed'))
self.setAttribute('run_am', True)
return self
......
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