Fix edition formsemestre

This commit is contained in:
Emmanuel Viennet 2024-02-05 11:03:34 +01:00
parent e6a544906e
commit bbdf5da2e8

View File

@ -297,10 +297,11 @@ def read_formsemestre_responsables(formsemestre_id: int) -> list[int]: # py3.9+
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")
if sem and "responsables" in sem:
sem["responsables"] = [
uid for uid in sem["responsables"] if (uid is not None) and (uid != -1)
]
_write_formsemestre_aux(sem, "responsables", "responsable_id")
# ---------------------- Coefs des UE