diff --git a/capsulflask/admin.py b/capsulflask/admin.py index 6b57197..e08511c 100644 --- a/capsulflask/admin.py +++ b/capsulflask/admin.py @@ -163,6 +163,9 @@ def index(): host_network_key = f"{host_id}_{network['network_name']}" if host_network_key in db_vms_by_host_network: for vm in db_vms_by_host_network[host_network_key]: + if 'public_ipv4' not in vm or vm['public_ipv4'] is None: + continue + ip_address_int = int(ipaddress.ip_address(vm['public_ipv4'])) if network_start_int <= ip_address_int and ip_address_int <= network_end_int: allocation = f"{host_id}_{network['network_name']}_{len(network['allocations'])}"