mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Le check ne doit etre fait que si il y a une ip
This commit is contained in:
parent
71eed60ad9
commit
b9030ecfe4
1 changed files with 4 additions and 3 deletions
|
@ -411,9 +411,10 @@ class Interface(models.Model):
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
self.filter_macaddress()
|
self.filter_macaddress()
|
||||||
# On verifie la cohérence en forçant l'extension par la méthode
|
# On verifie la cohérence en forçant l'extension par la méthode
|
||||||
if self.type.ip_type != self.ipv4.ip_type:
|
if self.ipv4:
|
||||||
raise ValidationError("L'ipv4 et le type de la machine ne\
|
if self.type.ip_type != self.ipv4.ip_type:
|
||||||
correspondent pas")
|
raise ValidationError("L'ipv4 et le type de la machine ne\
|
||||||
|
correspondent pas")
|
||||||
super(Interface, self).save(*args, **kwargs)
|
super(Interface, self).save(*args, **kwargs)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Reference in a new issue