1
0
forked from ScoDoc/ScoDoc

Merge pull request 'Fix PE generation' (#296) from yann/ScoDoc:master into master

Reviewed-on: https://scodoc.org/git/ScoDoc/ScoDoc/pulls/296
This commit is contained in:
Emmanuel Viennet 2022-01-26 23:49:13 +01:00
commit 00fe353c54
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:
logo = find_logo(logoname=name, dept_id=g.scodoc_dept_id)
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 fourni via le formulaire Web
if avis_tmpl_file:
template_latex = avis_tmpl_file.read()
template_latex = avis_tmpl_file.read().decode('utf-8')
template_latex = template_latex
else:
# template indiqué dans préférences ScoDoc ?
@ -114,7 +114,7 @@ def pe_view_sem_recap(
footer_latex = ""
# template fourni via le formulaire Web
if footer_tmpl_file:
footer_latex = footer_tmpl_file.read()
footer_latex = footer_tmpl_file.read().decode('utf-8')
footer_latex = footer_latex
else:
footer_latex = pe_avislatex.get_code_latex_from_scodoc_preference(