This commit is contained in:
modulos 2017-05-23 11:17:38 +02:00
parent ccb583b20d
commit 4c8a4d0be8

View file

@ -155,7 +155,7 @@ class VirtualMachineSerializer(serializers.Serializer):
def get_ip(self, obj): def get_ip(self, obj):
nic = obj.template.nics[0] nic = obj.template.nics[0]
if 'vm-ipv6-nat64-ipv4' is in nic.network and is_in_v4_range(nic.mac): if 'vm-ipv6-nat64-ipv4' in nic.network and is_in_v4_range(nic.mac):
return str(v4_from_mac(nic.mac)) return str(v4_from_mac(nic.mac))
else: else:
return '-' return '-'