forked from ScoDoc/ScoDoc
Import données admission: colonne 'groupes' optionnelle
This commit is contained in:
parent
58e42c093d
commit
e374a0e887
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user