mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 07:02:22 +00:00
Check that notes correspond to someone in the jury, and throw an error if this is not the case
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
d75c800275
commit
3b7f2130f3
@ -810,10 +810,14 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView):
|
||||
pool = self.get_object()
|
||||
parsed_notes = form.cleaned_data['parsed_notes']
|
||||
|
||||
for vr, notes in parsed_notes.items():
|
||||
for vr in parsed_notes.keys():
|
||||
if vr not in pool.juries.all():
|
||||
form.add_error('file', _("The following user is not registered as a jury:") + " " + str(vr))
|
||||
|
||||
if form.errors:
|
||||
return self.form_invalid(form)
|
||||
|
||||
for vr, notes in parsed_notes.items():
|
||||
# There is an observer note for 4-teams pools
|
||||
notes_count = 7 if pool.passages.count() == 4 else 6
|
||||
for i, passage in enumerate(pool.passages.all()):
|
||||
|
Loading…
Reference in New Issue
Block a user