Fix error

This commit is contained in:
Yohann D'ANELLO 2022-05-15 16:16:41 +02:00
parent d18f76cf80
commit 50409931cf
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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()