From da5445baa8e285c54824dbcd561b1fbaa1e4bfca Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 15 Jan 2022 14:59:59 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9liore=20message=20erreur=20import=20?= =?UTF-8?q?=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 9f3ed6472..b717f2d19 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: