From d4c7b39f463c8a676b5ca464fee5dbaf3721848c Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 3 Apr 2021 22:02:53 +0200 Subject: [PATCH] Fix solution and synthesis forms --- apps/participation/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/participation/forms.py b/apps/participation/forms.py index 44663ea..12e6c20 100644 --- a/apps/participation/forms.py +++ b/apps/participation/forms.py @@ -154,7 +154,7 @@ class SolutionForm(forms.ModelForm): pages = len(pdf_reader.pages) if pages > 30: raise ValidationError(_("The PDF file must not have more than 30 pages.")) - return self.cleaned_data["photo_authorization"] + return self.cleaned_data["file"] def save(self, commit=True): """ @@ -213,7 +213,7 @@ class SynthesisForm(forms.ModelForm): raise ValidationError(_("The uploaded file size must be under 2 Mo.")) if file.content_type != "application/pdf": raise ValidationError(_("The uploaded file must be a PDF file.")) - return self.cleaned_data["photo_authorization"] + return self.cleaned_data["file"] def save(self, commit=True): """