From de429812316fdee9d012cbae71aa23f70dfe4356 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 16 Feb 2021 22:38:08 +0100 Subject: [PATCH] Fix: saisie absence sur module sans inscrits --- ZAbsences.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ZAbsences.py b/ZAbsences.py index c67857c23..049875327 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}