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