try to fix get_all_by_id

This commit is contained in:
forest 2021-12-10 20:06:21 -05:00
parent 63332108aa
commit 59fd43e164

View File

@ -183,8 +183,9 @@ class CapsulFlaskHub(VirtualizationInterface):
host = online_hosts[i] host = online_hosts[i]
result = results[i] result = results[i]
try: try:
current_app.logger.info(f"\n********5:\n{result.body}\n\n\n\n")
result_body = json.loads(result.body) result_body = json.loads(result.body)
for id, vm in result_body.items(): for id, vm in result_body['vms'].items():
vm['host'] = host.id vm['host'] = host.id
to_return[id] = vm to_return[id] = vm
except: except: