1
0
forked from ScoDoc/ScoDoc

Fix: pd PDF si prefs. vides

This commit is contained in:
Emmanuel Viennet 2022-06-25 07:41:37 +02:00
parent f9b50bb290
commit ca5fd33e4e

View File

@ -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, '<para leftindent="%(htab1)s">')
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, '<para leftindent="%(htab1)s">')
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(
"<para>"
+ sco_preferences.get_preference("PV_INTRO", formsemestre_id)
+ (sco_preferences.get_preference("PV_INTRO", formsemestre_id) or "")
% {
"Decnum": numeroArrete,
"VDICode": VDICode,