mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-27 01:13:46 +00:00
Oublie d'un __in
This commit is contained in:
parent
62aaa31e63
commit
2c63c3f9f6
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ class Alias(models.Model):
|
||||||
|
|
||||||
def clean(self, *args, **kwargs):
|
def clean(self, *args, **kwargs):
|
||||||
if hasattr(self, 'alias') and hasattr(self, 'extension'):
|
if hasattr(self, 'alias') and hasattr(self, 'extension'):
|
||||||
if Interface.objects.filter(dns=self.alias).filter(ipv4=IpList.objects.filter(ip_type=IpType.objects.filter(extension=self.extension))):
|
if Interface.objects.filter(dns=self.alias).filter(ipv4__in=IpList.objects.filter(ip_type__in=IpType.objects.filter(extension=self.extension))):
|
||||||
raise ValidationError("Impossible d'ajouter l'alias, déjà utilisé par une machine")
|
raise ValidationError("Impossible d'ajouter l'alias, déjà utilisé par une machine")
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Reference in a new issue