diff --git a/app/scodoc/sco_bulletins_standard.py b/app/scodoc/sco_bulletins_standard.py index 842844d680..f1b2b7cc73 100644 --- a/app/scodoc/sco_bulletins_standard.py +++ b/app/scodoc/sco_bulletins_standard.py @@ -380,10 +380,10 @@ class BulletinGeneratorStandard(sco_bulletins_generator.BulletinGenerator): t = { "titre": "Moyenne générale:", "rang": I["rang_nt"], - "note": I["moy_gen"], - "min": I["moy_min"], - "max": I["moy_max"], - "moy": I["moy_moy"], + "note": I.get("moy_gen", "-"), + "min": I.get("moy_min", "-"), + "max": I.get("moy_max", "-"), + "moy": I.get("moy_moy", "-"), "abs": "%s / %s" % (nbabs, nbabsjust), "_css_row_class": "notes_bulletin_row_gen", "_titre_colspan": 2, diff --git a/app/scodoc/sco_edit_apc.py b/app/scodoc/sco_edit_apc.py index cec8b7c2a1..c53094ef53 100644 --- a/app/scodoc/sco_edit_apc.py +++ b/app/scodoc/sco_edit_apc.py @@ -166,7 +166,7 @@ def html_edit_formation_apc( def html_ue_infos(ue): - """page d'information sur une UE""" + """Page d'information sur une UE""" from app.views import ScoData formsemestres = ( @@ -189,7 +189,6 @@ def html_ue_infos(ue): ) return render_template( "pn/ue_infos.html", - # "pn/tmp.html", titre=f"UE {ue.acronyme} {ue.titre}", ue=ue, formsemestres=formsemestres, diff --git a/app/views/__init__.py b/app/views/__init__.py index f3c8e13d4f..4696872a18 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -97,7 +97,12 @@ class ScoData: self.sem.to_dict() ) # --- Préférences - self.prefs = sco_preferences.SemPreferences(formsemestre.id) + # prefs fallback to global pref if sem is None: + if formsemestre: + formsemestre_id = formsemestre.id + else: + formsemestre_id = None + self.prefs = sco_preferences.SemPreferences(formsemestre_id) from app.views import scodoc, notes, scolar, absences, users, pn_modules, refcomp diff --git a/sco_version.py b/sco_version.py index 7657bac433..e62e3eb870 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.1.78" +SCOVERSION = "9.1.79" SCONAME = "ScoDoc"