From 0dff3bad078dd90a602e6bd64d201aa0f0980e6a Mon Sep 17 00:00:00 2001 From: forest Date: Thu, 16 Dec 2021 15:56:14 -0600 Subject: [PATCH] fix order of operations bug --- capsulflask/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capsulflask/admin.py b/capsulflask/admin.py index fc850c4..12c80c7 100644 --- a/capsulflask/admin.py +++ b/capsulflask/admin.py @@ -210,7 +210,7 @@ def index(): state_not_equal_to_desired_state.append(db_vm) elif 'public_ipv4' not in db_vm or db_vm["public_ipv4"] == "": has_no_desired_ip_address.append(db_vm) - elif db_vm["desired_state"] == "running" and 'public_ipv4' not in virt_vms_by_id[vm_id] or virt_vms_by_id[vm_id]['public_ipv4'] == "": + elif db_vm["desired_state"] == "running" and ('public_ipv4' not in virt_vms_by_id[vm_id] or virt_vms_by_id[vm_id]['public_ipv4'] == ""): has_not_aquired_ip_address_yet.append(db_vm) elif db_vm["desired_state"] == "running" and virt_vms_by_id[vm_id]['public_ipv4'] != db_vm["public_ipv4"]: db_vm["desired_ipv4"] = db_vm["public_ipv4"]