From 30e33280573713cb86196c2076c722058b387475 Mon Sep 17 00:00:00 2001
From: Emmanuel Viennet <emmanuel.viennet@gmail.com>
Date: Fri, 18 Mar 2022 19:33:07 +0100
Subject: [PATCH] Cas ou departement sans nom complet

---
 app/scodoc/sco_trombino_tours.py | 9 +++++++--
 app/views/absences.py            | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/app/scodoc/sco_trombino_tours.py b/app/scodoc/sco_trombino_tours.py
index c1ff7bccc..61d80de2e 100644
--- a/app/scodoc/sco_trombino_tours.py
+++ b/app/scodoc/sco_trombino_tours.py
@@ -74,7 +74,11 @@ def pdf_trombino_tours(
     T = Table(
         [
             [Paragraph(SU(InstituteName), StyleSheet["Heading3"])],
-            [Paragraph(SU("Département " + DeptFullName), StyleSheet["Heading3"])],
+            [
+                Paragraph(
+                    SU("Département " + DeptFullName or "(?)"), StyleSheet["Heading3"]
+                )
+            ],
             [
                 Paragraph(
                     SU("Date ............ / ............ / ......................"),
@@ -321,7 +325,8 @@ def pdf_feuille_releve_absences(
                 ],
                 [
                     Paragraph(
-                        SU("Département " + DeptFullName), StyleSheet["Heading3"]
+                        SU("Département " + (DeptFullName or "(?)")),
+                        StyleSheet["Heading3"],
                     ),
                     "",
                 ],
diff --git a/app/views/absences.py b/app/views/absences.py
index bdbae1458..f75232844 100644
--- a/app/views/absences.py
+++ b/app/views/absences.py
@@ -613,7 +613,7 @@ def SignaleAbsenceGrSemestre(
                     "modimpl_id": modimpl["moduleimpl_id"],
                     "modname": (modimpl["module"]["code"] or "")
                     + " "
-                    + (modimpl["module"]["abbrev"] or modimpl["module"]["titre"]),
+                    + (modimpl["module"]["abbrev"] or modimpl["module"]["titre"] or ""),
                     "sel": sel,
                 }
             )