1
0
forked from ScoDoc/ScoDoc

Si format bulletin inconnu, revient au défaut

This commit is contained in:
Emmanuel Viennet 2022-03-18 19:32:13 +01:00
parent 4fda9cb391
commit cadc26d581

View File

@ -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(