From 3d41b71b01acc803b3a1be525f8c76bf5736198a Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Wed, 14 Dec 2016 19:07:20 +0100 Subject: [PATCH] Oublie d'un __in --- machines/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machines/models.py b/machines/models.py index 30494cd1..26a3166f 100644 --- a/machines/models.py +++ b/machines/models.py @@ -113,7 +113,7 @@ class Alias(models.Model): def clean(self, *args, **kwargs): 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") def __str__(self):