From d132c54a5188aa9e7e83a3f657a29d5e7ff5aa55 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 15 Dec 2023 05:34:11 +0100 Subject: [PATCH] Fix: formsemestre_status: cas avec notes mais sans modules compatibles --- app/scodoc/sco_formsemestre_status.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index 3d4b2d43c..0d04b9ac7 100755 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -1418,13 +1418,14 @@ def get_formsemestre_etudids_sans_notes( ) if not nb_notes_sem: return set() - etudids_sans_notes = set.intersection( - *[ - set.intersection(*m_res.evals_etudids_sans_note.values()) - for m_res in res.modimpls_results.values() - if m_res.evals_etudids_sans_note - ] - ) + notes_modimpls = [ + set.intersection(*m_res.evals_etudids_sans_note.values()) + for m_res in res.modimpls_results.values() + if m_res.evals_etudids_sans_note + ] + if not notes_modimpls: + return set() + etudids_sans_notes = set.intersection(*notes_modimpls) nb_sans_notes = len(etudids_sans_notes) if nb_sans_notes > 0 and nb_sans_notes < len( formsemestre.get_inscrits(include_demdef=False)