From ca5fd33e4eae2404821b1a1fc605b19b4842d3df Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 25 Jun 2022 07:41:37 +0200 Subject: [PATCH] Fix: pd PDF si prefs. vides --- app/scodoc/sco_pvpdf.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/scodoc/sco_pvpdf.py b/app/scodoc/sco_pvpdf.py index 3ac0096d6..b2515895c 100644 --- a/app/scodoc/sco_pvpdf.py +++ b/app/scodoc/sco_pvpdf.py @@ -446,8 +446,8 @@ def pdf_lettre_individuelle(sem, decision, etud, params, signature=None): else: params["decisions_ue_descr_plural"] = "" - params["INSTITUTION_CITY"] = sco_preferences.get_preference( - "INSTITUTION_CITY", formsemestre_id + params["INSTITUTION_CITY"] = ( + sco_preferences.get_preference("INSTITUTION_CITY", formsemestre_id) or "" ) if decision["prev_decision_sem"]: params["prev_semestre_id"] = decision["prev"]["semestre_id"] @@ -528,8 +528,8 @@ def pdf_lettre_individuelle(sem, decision, etud, params, signature=None): sco_preferences.get_preference( "PV_LETTER_PASSAGE_SIGNATURE", formsemestre_id ) - % params - ) + or "" + ) % params sig = _simulate_br(sig, '') objects += sco_pdf.makeParas( ( @@ -545,8 +545,8 @@ def pdf_lettre_individuelle(sem, decision, etud, params, signature=None): sco_preferences.get_preference( "PV_LETTER_DIPLOMA_SIGNATURE", formsemestre_id ) - % params - ) + or "" + ) % params sig = _simulate_br(sig, '') objects += sco_pdf.makeParas( ( @@ -731,7 +731,7 @@ def _pvjury_pdf_type( """ % ( titre_jury, - sco_preferences.get_preference("DeptName", formsemestre_id), + sco_preferences.get_preference("DeptName", formsemestre_id) or "(sans nom)", sem["anneescolaire"], ), style, @@ -761,7 +761,7 @@ def _pvjury_pdf_type( objects += sco_pdf.makeParas( "" - + sco_preferences.get_preference("PV_INTRO", formsemestre_id) + + (sco_preferences.get_preference("PV_INTRO", formsemestre_id) or "") % { "Decnum": numeroArrete, "VDICode": VDICode,