fixing exception in capsul detail

This commit is contained in:
2021-02-17 21:10:20 -06:00
parent bf927c4f1e
commit ea1eec7f92
2 changed files with 4 additions and 1 deletions

View File

@ -160,6 +160,8 @@ def detail(id):
vm["state"] = vm_from_virt_model.state
if needs_ssh_host_keys:
vm["ssh_host_keys"] = vm_from_virt_model.ssh_host_keys
else:
vm["state"] = "unknown"
if vm["state"] == "running" and not vm["ipv4"]:
vm["state"] = "starting"