1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-03-14 08:37:31 +00:00

Team name don't need to be uppercase

This commit is contained in:
Yohann D'ANELLO 2022-02-04 15:40:45 +01:00
parent 7515c2bec6
commit cdf279bb02
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -20,7 +20,7 @@ class TeamForm(forms.ModelForm):
""" """
def clean_name(self): def clean_name(self):
if "name" in self.cleaned_data: if "name" in self.cleaned_data:
name = self.cleaned_data["name"].upper() name = self.cleaned_data["name"]
if not self.instance.pk and Team.objects.filter(name=name).exists(): if not self.instance.pk and Team.objects.filter(name=name).exists():
raise ValidationError(_("This name is already used.")) raise ValidationError(_("This name is already used."))
return name return name