diff --git a/apps/participation/forms.py b/apps/participation/forms.py index bcd2751..d5055b7 100644 --- a/apps/participation/forms.py +++ b/apps/participation/forms.py @@ -246,7 +246,7 @@ class UploadNotesForm(forms.Form): jury = User.objects.filter(first_name=first_name, last_name=last_name) if jury.count() != 1: - self.form.add_error('file', _("The following user was not found:") + " " + name) + self.add_error('file', _("The following user was not found:") + " " + name) continue jury = jury.get() diff --git a/apps/participation/views.py b/apps/participation/views.py index e10ab8a..040447a 100644 --- a/apps/participation/views.py +++ b/apps/participation/views.py @@ -730,7 +730,7 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView): form.add_error('file', _("The following user is not registered as a jury:") + " " + str(vr)) for i, passage in enumerate(pool.passages.all()): - note = Note.objects.get(jury=vr, passage=passage) + note = Note.objects.get_or_create(jury=vr, passage=passage)[0] passage_notes = notes[6 * i:6 * (i + 1)] note.set_all(*passage_notes) note.save()