From e374a0e887efbf2e8cad2703483864ec0e13975e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 14 Sep 2022 10:15:27 +0200 Subject: [PATCH] =?UTF-8?q?Import=20donn=C3=A9es=20admission:=20colonne=20?= =?UTF-8?q?'groupes'=20optionnelle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_import_etuds.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/scodoc/sco_import_etuds.py b/app/scodoc/sco_import_etuds.py index 4453c8a18..629dec355 100644 --- a/app/scodoc/sco_import_etuds.py +++ b/app/scodoc/sco_import_etuds.py @@ -705,15 +705,14 @@ def scolars_import_admission(datafile, formsemestre_id=None, type_admission=None adresse_id = sco_etud.adresse_create(cnx, args) # log('import_adm: %s' % args ) # Change les groupes si nécessaire: - if args["groupes"]: + if "groupes" in args: gi = sco_groups.GroupIdInferer(formsemestre_id) groupes = args["groupes"].split(";") group_ids = [gi[group_name] for group_name in groupes] group_ids = list({}.fromkeys(group_ids).keys()) # uniq if None in group_ids: raise ScoValueError( - "groupe invalide sur la ligne %d (groupe %s)" - % (nline, groupes) + f"groupe invalide sur la ligne {nline} (groupes {groupes})" ) for group_id in group_ids: