Fix failure creating device when MAC is empty

This commit is contained in:
Kumi 2019-04-18 14:04:13 +00:00
parent df681072e2
commit b85c772254

View file

@ -461,7 +461,7 @@ def makedevice(request):
network=Network.objects.filter(intip="No VPN")[0],
organization=Organization.objects.filter(id=device_organization)[0],
vpnconfig = open(CONFIGDIR + "/files/" + device_serial + ".ovpn").read(),
mac = device_mac,
mac = device_mac or None,
changed = timezone.now()
)