From 556725b3efb0ebfaf5e9bbce4a00cb66b07aa5dd Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 31 Jan 2024 14:27:08 +0100 Subject: [PATCH] 3 petites corrections --- app/but/bulletin_but_court_pdf.py | 2 +- app/templates/assiduites/pages/ajout_justificatif_etud.j2 | 2 +- app/views/scolar.py | 4 +++- sco_version.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/but/bulletin_but_court_pdf.py b/app/but/bulletin_but_court_pdf.py index 58528045..2021ddf6 100644 --- a/app/but/bulletin_but_court_pdf.py +++ b/app/but/bulletin_but_court_pdf.py @@ -416,7 +416,7 @@ class BulletinGeneratorBUTCourt(BulletinGeneratorStandard): f""" {self.bul["demission"]}
Formation: {self.formsemestre.titre_num()}
- Année scolaire: {self.formsemestre.annee_scolaire_str()}
+ Année universitaire: {self.formsemestre.annee_scolaire_str()}
""" ), style=self.style_base, diff --git a/app/templates/assiduites/pages/ajout_justificatif_etud.j2 b/app/templates/assiduites/pages/ajout_justificatif_etud.j2 index 4088bbac..feced80e 100644 --- a/app/templates/assiduites/pages/ajout_justificatif_etud.j2 +++ b/app/templates/assiduites/pages/ajout_justificatif_etud.j2 @@ -93,7 +93,7 @@ div.submit > input { {{ render_field_errors(form, 'raison') }}
La raison sera visible aux utilisateurs ayant le droit AbsJustifView et à celui ayant déposé le justificatif - {%- if justif %} ({{justif.user.get_prenomnom()}}){%- endif -%}. + {%- if justif and justif.user %} ({{justif.user.get_prenomnom()}}){%- endif -%}.
{% else %}
raison confidentielle
diff --git a/app/views/scolar.py b/app/views/scolar.py index 7e1837ce..b9e57cbe 100644 --- a/app/views/scolar.py +++ b/app/views/scolar.py @@ -2089,7 +2089,9 @@ def export_etudiants_courants(): departement = Departement.query.get(g.scodoc_dept_id) if not departement: raise ScoValueError("département invalide") - formsemestres = FormSemestre.get_dept_formsemestres_courants(departement) + formsemestres = FormSemestre.get_dept_formsemestres_courants(departement).all() + if not formsemestres: + raise ScoValueError("aucun semestre courant !") table = list_etuds.table_etudiants_courants(formsemestres) if fmt.startswith("xls"): return scu.send_file( diff --git a/sco_version.py b/sco_version.py index 65feb9eb..66bec19b 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.6.89" +SCOVERSION = "9.6.90" SCONAME = "ScoDoc"