1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 17:42:24 +00:00

A motivation letter must be a PDF/JPEG/PNG file (it didn't work)

This commit is contained in:
Yohann D'ANELLO 2021-01-23 14:26:15 +01:00
parent d9a2b31606
commit b5136ffa91
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -61,7 +61,7 @@ class ParticipationForm(forms.ModelForm):
class MotivationLetterForm(forms.ModelForm):
def clean_file(self):
if "file" in self.files:
if "motivation_letter" in self.files:
file = self.files["motivation_letter"]
if file.size > 2e6:
raise ValidationError(_("The uploaded file size must be under 2 Mo."))