Fix PE generation

This commit is contained in:
Yann Leboulanger 2022-01-26 14:27:55 +01:00
parent 4c5c20ce7e
commit a47faa0115
2 changed files with 3 additions and 3 deletions

View File

@ -206,7 +206,7 @@ def add_pe_stuff_to_zip(zipfile, ziproot):
for name in logos_names: for name in logos_names:
logo = find_logo(logoname=name, dept_id=g.scodoc_dept_id) logo = find_logo(logoname=name, dept_id=g.scodoc_dept_id)
if logo is not None: if logo is not None:
add_local_file_to_zip(zipfile, ziproot, logo, "avis/logos/" + logo.filename) add_local_file_to_zip(zipfile, ziproot, logo.filepath, "avis/logos/" + logo.filename)
# ---------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------

View File

@ -97,7 +97,7 @@ def pe_view_sem_recap(
template_latex = "" template_latex = ""
# template fourni via le formulaire Web # template fourni via le formulaire Web
if avis_tmpl_file: if avis_tmpl_file:
template_latex = avis_tmpl_file.read() template_latex = avis_tmpl_file.read().decode('utf-8')
template_latex = template_latex template_latex = template_latex
else: else:
# template indiqué dans préférences ScoDoc ? # template indiqué dans préférences ScoDoc ?
@ -114,7 +114,7 @@ def pe_view_sem_recap(
footer_latex = "" footer_latex = ""
# template fourni via le formulaire Web # template fourni via le formulaire Web
if footer_tmpl_file: if footer_tmpl_file:
footer_latex = footer_tmpl_file.read() footer_latex = footer_tmpl_file.read().decode('utf-8')
footer_latex = footer_latex footer_latex = footer_latex
else: else:
footer_latex = pe_avislatex.get_code_latex_from_scodoc_preference( footer_latex = pe_avislatex.get_code_latex_from_scodoc_preference(