From cadc26d581875421cd18e59ca3876ca80d5a2166 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 18 Mar 2022 19:32:13 +0100 Subject: [PATCH] =?UTF-8?q?Si=20format=20bulletin=20inconnu,=20revient=20a?= =?UTF-8?q?u=20d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_bulletins_generator.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_bulletins_generator.py b/app/scodoc/sco_bulletins_generator.py index d3193ade2..c62eff057 100644 --- a/app/scodoc/sco_bulletins_generator.py +++ b/app/scodoc/sco_bulletins_generator.py @@ -266,10 +266,15 @@ def make_formsemestre_bulletinetud( bul_class_name = sco_preferences.get_preference("bul_class_name", formsemestre_id) gen_class = None - if infos.get("type") == "BUT" and format.startswith("pdf"): - gen_class = bulletin_get_class(bul_class_name + "BUT") - if gen_class is None: - gen_class = bulletin_get_class(bul_class_name) + for bul_class_name in ( + sco_preferences.get_preference("bul_class_name", formsemestre_id), + # si pas trouvé (modifs locales bizarres ,), ré-essaye avec la valeur par défaut + bulletin_default_class_name(), + ): + if infos.get("type") == "BUT" and format.startswith("pdf"): + gen_class = bulletin_get_class(bul_class_name + "BUT") + if gen_class is None: + gen_class = bulletin_get_class(bul_class_name) if gen_class is None: raise ValueError(