Fix error
This commit is contained in:
parent
d18f76cf80
commit
50409931cf
|
@ -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()
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue