allow an IP to be Null

if the device is in DHCP mode it won't have an IP address therefore the user
must be able to leave the field empty.
This commit is contained in:
Andreas Zweili 2020-04-30 20:11:23 +02:00
parent 2639121fb8
commit 0ea216fc56
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class ConnectedDevice(Device):
class DeviceInNet(models.Model):
device = models.ForeignKey(ConnectedDevice, on_delete=models.CASCADE)
net = models.ForeignKey(Net, on_delete=models.CASCADE)
ip = models.GenericIPAddressField(verbose_name="IP")
ip = models.GenericIPAddressField(verbose_name="IP", blank=True, null=True)
nic = models.CharField(max_length=50, blank=True, verbose_name="NIC")
mac_address = models.CharField(max_length=50,
blank=True,