Fix a bug in slave API. 43/50843/1
authorThomas Duval <thomas.duval@orange.com>
Fri, 19 Jan 2018 12:58:50 +0000 (13:58 +0100)
committerThomas Duval <thomas.duval@orange.com>
Fri, 19 Jan 2018 12:58:50 +0000 (13:58 +0100)
Change-Id: I50a424c0aaba32a35d94966bee051ca673f1fe25

moon_manager/moon_manager/api/slaves.py

index d87b8aa..f5b3fa1 100644 (file)
@@ -64,7 +64,7 @@ class Slaves(Resource):
         req = requests.get("http://{}:{}/slaves".format(
             self.orchestrator_hostname, self.orchestrator_port
         ))
-        return {"slaves": req.json()}
+        return {"slaves": req.json().get("slaves", dict())}
 
     @check_auth
     def patch(self, uuid=None, user_id=None):