Commit 14f2fad7 authored by Daniele Venzano's avatar Daniele Venzano

Fix exception for home page when master is down

parent 15d5f603
......@@ -204,6 +204,8 @@ class Execution(BaseRecord):
@property
def total_reservations(self):
"""Return the union/sum of resources reserved by all services of this execution."""
if len(self.services) == 0:
return 0
return functools.reduce(lambda x, y: x + y, [s.resource_reservation for s in self.services])
def __repr__(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