Revision 03805fc8 logic/backend.py

b/logic/backend.py
57 57

  
58 58
    # For the time being, we can only update the ipfour field,
59 59
    # based on the IPv4 address of the first NIC
60
    vm.ipfour = nics[0]['ip']
60
    if len(nics) > 0:
61
        ipv4 = nics[0]['ip']
62
        if ipv4 == '':
63
            ipv4 = '0.0.0.0'
64
        vm.ipfour = ipv4
61 65
    vm.save()
62 66

  
63 67

  

Also available in: Unified diff