From b5136ffa915f94d18408ac0adf90872c1b9b6a1c Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 23 Jan 2021 14:26:15 +0100 Subject: [PATCH] A motivation letter must be a PDF/JPEG/PNG file (it didn't work) --- apps/participation/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/participation/forms.py b/apps/participation/forms.py index f80fefe..de77aba 100644 --- a/apps/participation/forms.py +++ b/apps/participation/forms.py @@ -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."))