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: