From 69d494c02cd85bd7a1a33764bafa5c928338ee7c Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 14 Jan 2022 11:18:31 +0100 Subject: [PATCH 1/2] Fix: evaluation_listenotes si aucun inscrit --- app/scodoc/sco_liste_notes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_liste_notes.py b/app/scodoc/sco_liste_notes.py index f19c9568..dace96b0 100644 --- a/app/scodoc/sco_liste_notes.py +++ b/app/scodoc/sco_liste_notes.py @@ -201,6 +201,7 @@ def do_evaluation_listenotes( note_sur_20 = tf[2]["note_sur_20"] hide_groups = tf[2]["hide_groups"] with_emails = tf[2]["with_emails"] + group_ids = [x for x in tf[2]["group_ids"] if x != ""] return ( _make_table_notes( tf[1], @@ -208,7 +209,7 @@ def do_evaluation_listenotes( format=format, note_sur_20=note_sur_20, anonymous_listing=anonymous_listing, - group_ids=tf[2]["group_ids"], + group_ids=group_ids, hide_groups=hide_groups, with_emails=with_emails, mode=mode, From da5445baa8e285c54824dbcd561b1fbaa1e4bfca Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 15 Jan 2022 14:59:59 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Am=C3=A9liore=20message=20erreur=20import?= =?UTF-8?q?=20=C3=A9tudiants=20via=20excel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_import_etuds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scodoc/sco_import_etuds.py b/app/scodoc/sco_import_etuds.py index 9f3ed647..b717f2d1 100644 --- a/app/scodoc/sco_import_etuds.py +++ b/app/scodoc/sco_import_etuds.py @@ -550,9 +550,9 @@ def _import_one_student( formsemestre_id = values["codesemestre"] try: formsemestre_id = int(formsemestre_id) - except ValueError as exc: + except (ValueError, TypeError) as exc: raise ScoValueError( - f"valeur invalide dans la colonne codesemestre, ligne {linenum+1}" + f"valeur invalide ou manquante dans la colonne codesemestre, ligne {linenum+1}" ) from exc # recupere liste des groupes: if formsemestre_id not in GroupIdInferers: