1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-24 17:02:24 +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):
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():
raise ValidationError(_("This name is already used."))
return name