a little bit safer when finding the right vcpe
diff --git a/xos/observers/vcpe/steps/sync_vcpetenant.py b/xos/observers/vcpe/steps/sync_vcpetenant.py
index 8711c57..3fc9310 100644
--- a/xos/observers/vcpe/steps/sync_vcpetenant.py
+++ b/xos/observers/vcpe/steps/sync_vcpetenant.py
@@ -61,7 +61,7 @@
for prefix in CDNPrefix.objects.all():
cdn_prefixes.append(prefix.prefix)
- volts = [x for x in VOLTTenant.get_tenant_objects() if x.vcpe.id==o.id]
+ volts = [x for x in VOLTTenant.get_tenant_objects() if (x.vcpe is not None) and (x.vcpe.id==o.id)]
vlan_ids = [x.vlan_id for x in volts]
return {"vlan_ids": vlan_ids,
"dnsdemux_ip": dnsdemux_ip,