mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-25 00:13:45 +00:00
Hotfix
This commit is contained in:
parent
aed021821a
commit
018f6c3ebc
1 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,10 @@ class Interface(models.Model):
|
||||||
|
|
||||||
def clean(self, *args, **kwargs):
|
def clean(self, *args, **kwargs):
|
||||||
self.mac_address = str(EUI(self.mac_address)) or None
|
self.mac_address = str(EUI(self.mac_address)) or None
|
||||||
alias = Alias.objects.filter(alias=self.dns).filter(extension=self.ipv4.ip_type.extension)
|
if self.ipv4:
|
||||||
|
alias = Alias.objects.filter(alias=self.dns).filter(extension=self.ipv4.ip_type.extension)
|
||||||
|
else:
|
||||||
|
alias = Alias.objects.filter(alias=self.dns)
|
||||||
if alias:
|
if alias:
|
||||||
raise ValidationError("Impossible, le dns est déjà utilisé par un alias (%s)" % alias[0])
|
raise ValidationError("Impossible, le dns est déjà utilisé par un alias (%s)" % alias[0])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue