diff --git a/app/scodoc/sco_formsemestre.py b/app/scodoc/sco_formsemestre.py index 6659109d1..669537330 100644 --- a/app/scodoc/sco_formsemestre.py +++ b/app/scodoc/sco_formsemestre.py @@ -241,7 +241,7 @@ def do_formsemestre_create(args, silent=False): write_formsemestre_etapes(args) if args["responsables"]: args["formsemestre_id"] = formsemestre_id - write_formsemestre_responsables(args) + _write_formsemestre_responsables(args) # create default partition partition_id = sco_groups.partition_create( @@ -275,7 +275,7 @@ def do_formsemestre_edit(sem, cnx=None, **kw): _formsemestreEditor.edit(cnx, sem, **kw) write_formsemestre_etapes(sem) - write_formsemestre_responsables(sem) + _write_formsemestre_responsables(sem) sco_cache.invalidate_formsemestre( formsemestre_id=sem["formsemestre_id"] @@ -296,7 +296,10 @@ def read_formsemestre_responsables(formsemestre_id: int) -> list[int]: # py3.9+ return [x["responsable_id"] for x in r] -def write_formsemestre_responsables(sem): +def _write_formsemestre_responsables(sem): # TODO old, à ré-écrire avec models + sem["responsables"] = [ + uid for uid in sem["responsables"] if (uid is not None) and (uid != -1) + ] return _write_formsemestre_aux(sem, "responsables", "responsable_id") @@ -362,10 +365,11 @@ def read_formsemestre_etapes(formsemestre_id): # OBSOLETE return [ApoEtapeVDI(x["etape_apo"]) for x in r if x["etape_apo"]] -def write_formsemestre_etapes(sem): +def write_formsemestre_etapes(sem): # TODO old, à ré-écrire avec models return _write_formsemestre_aux(sem, "etapes", "etape_apo") +# TODO old, à ré-écrire avec models def _write_formsemestre_aux(sem, fieldname, valuename): """fieldname: 'etapes' ou 'responsables' valuename: 'etape_apo' ou 'responsable_id' diff --git a/sco_version.py b/sco_version.py index a7cb166cf..00f767542 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.6.932" +SCOVERSION = "9.6.933" SCONAME = "ScoDoc"