forked from ScoDoc/DocScoDoc
enhance check xls upload notes
This commit is contained in:
parent
03cfcf3298
commit
ddf3d73c92
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user