lims_report_html: pdf generator: avoid error when there is no css file

This commit is contained in:
Adrián Bernardi 2021-08-03 11:03:30 -03:00
parent ddafeda4c1
commit 683af25545
1 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ class PdfGenerator:
)
stylesheets = [CSS(string=content_print_layout)]
for sheet in self.stylesheets:
stylesheets.append(CSS(string=sheet))
stylesheets.append(CSS(string=sheet or ''))
html = HTML(
string=self.main_html,
@ -70,7 +70,7 @@ class PdfGenerator:
'\nfooter {position: fixed; width: 100%; bottom: 0;}')
stylesheets = [CSS(string=overlay_layout)]
for sheet in self.stylesheets:
stylesheets.append(CSS(string=sheet))
stylesheets.append(CSS(string=sheet or ''))
html = HTML(
string=getattr(self, '{}_html'.format(element)),