Fix: saisie absence sur module sans inscrits

This commit is contained in:
Emmanuel Viennet 2021-02-16 22:38:08 +01:00
parent 5ffeae3e1f
commit de42981231

View File

@ -718,7 +718,12 @@ class ZAbsences(
) )
] ]
) )
etuds = [e for e in etuds if e["etudid"] in mod_inscrits] etuds_inscrits_module = [e for e in etuds if e["etudid"] in mod_inscrits]
if etuds_inscrits_module:
etuds = etuds_inscrits_module
else:
# Si aucun etudiant n'est inscrit au module choisi...
moduleimpl_id = None
nt = self.Notes._getNotesCache().get_NotesTable(self.Notes, formsemestre_id) nt = self.Notes._getNotesCache().get_NotesTable(self.Notes, formsemestre_id)
sem = sco_formsemestre.do_formsemestre_list( sem = sco_formsemestre.do_formsemestre_list(
self, {"formsemestre_id": formsemestre_id} self, {"formsemestre_id": formsemestre_id}