diff --git a/tournaments/forms.py b/tournaments/forms.py index 3cfcd21..288d05b 100644 --- a/tournaments/forms.py +++ b/tournaments/forms.py @@ -62,7 +62,7 @@ class SimpleCustomUserCreationForm(UserCreationForm): username = self.cleaned_data.get('username') if username: username = username.lower() - if CustomUser.objects.filter(username__iexact=username).exists() | CustomUser.objects.filter(email__iexact=username): + if CustomUser.objects.filter(username__iexact=username).exists() | CustomUser.objects.filter(email__iexact=username).exists(): raise forms.ValidationError("Cet identifiant est déjà utilisé. Veuillez en choisir un autre :)") return username