1
0
forked from ScoDoc/ScoDoc

Merge branch 'master' of https://scodoc.org/git/viennet/ScoDoc into PNBUT

update
This commit is contained in:
Emmanuel Viennet 2021-11-10 09:38:08 +01:00
commit 139eb8171a

View File

@ -202,11 +202,14 @@ def do_evaluation_upload_xls():
diag.append("Erreur: format invalide ! (pas de ligne evaluation_id)")
raise InvalidNoteValue()
eval_id = int(lines[i][0].strip()[1:])
eval_id_str = lines[i][0].strip()[1:]
try:
eval_id = int(eval_id_str)
except ValueError:
eval_id = None
if eval_id != evaluation_id:
diag.append(
"Erreur: fichier invalide: le code d'évaluation de correspond pas ! ('%s' != '%s')"
% (eval_id, evaluation_id)
f"Erreur: fichier invalide: le code d'évaluation de correspond pas ! ('{eval_id_str}' != '{evaluation_id}')"
)
raise InvalidNoteValue()
# --- get notes -> list (etudid, value)