diff --git a/ZAbsences.py b/ZAbsences.py index c67857c23f..049875327d 100644 --- a/ZAbsences.py +++ b/ZAbsences.py @@ -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) sem = sco_formsemestre.do_formsemestre_list( self, {"formsemestre_id": formsemestre_id}