From 9da55063612a593f0342d3df2d1a5bc074ee1777 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 31 Oct 2022 09:46:30 +0100 Subject: [PATCH] =?UTF-8?q?BUT:=20=C3=A9dition=20des=20coefs:=20UE=20et=20?= =?UTF-8?q?mod=20de=20tronc=20commun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pn_modules.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/pn_modules.py b/app/views/pn_modules.py index b7c75dc43..049b8e7cb 100644 --- a/app/views/pn_modules.py +++ b/app/views/pn_modules.py @@ -86,9 +86,15 @@ def table_modules_ue_coefs(formation_id, semestre_idx=None, parcours_id: int = N df, ues, modules = moy_ue.df_load_module_coefs(formation_id, semestre_idx) # Filtrage par parcours if parcour is not None: - ues = [ue for ue in ues if parcours_id == ue.parcour_id] + ues = [ + ue + for ue in ues + if (parcours_id == ue.parcour_id) or (ue.parcour_id is None) + ] modules = [ - mod for mod in modules if parcours_id in (p.id for p in mod.parcours) + mod + for mod in modules + if (parcours_id in (p.id for p in mod.parcours)) or (mod.parcours is None) ] # Titre des modules, en ligne col_titres_mods = [