diff --git a/participation/forms.py b/participation/forms.py index 0a3f0f9..775422c 100644 --- a/participation/forms.py +++ b/participation/forms.py @@ -261,12 +261,11 @@ class UploadNotesForm(forms.Form): with file: try: csvfile = csv.reader(StringIO(file.read().decode())) + self.process(csvfile, cleaned_data) except UnicodeDecodeError: self.add_error('file', _("This file contains non-UTF-8 content. " "Please send your sheet as a CSV file.")) - self.process(csvfile, cleaned_data) - return cleaned_data def process(self, csvfile: Iterable[str], cleaned_data: dict):