lims_report_html: pdf generator: avoid error when there is no css file
This commit is contained in:
parent
ddafeda4c1
commit
683af25545
|
@ -50,7 +50,7 @@ class PdfGenerator:
|
||||||
)
|
)
|
||||||
stylesheets = [CSS(string=content_print_layout)]
|
stylesheets = [CSS(string=content_print_layout)]
|
||||||
for sheet in self.stylesheets:
|
for sheet in self.stylesheets:
|
||||||
stylesheets.append(CSS(string=sheet))
|
stylesheets.append(CSS(string=sheet or ''))
|
||||||
|
|
||||||
html = HTML(
|
html = HTML(
|
||||||
string=self.main_html,
|
string=self.main_html,
|
||||||
|
@ -70,7 +70,7 @@ class PdfGenerator:
|
||||||
'\nfooter {position: fixed; width: 100%; bottom: 0;}')
|
'\nfooter {position: fixed; width: 100%; bottom: 0;}')
|
||||||
stylesheets = [CSS(string=overlay_layout)]
|
stylesheets = [CSS(string=overlay_layout)]
|
||||||
for sheet in self.stylesheets:
|
for sheet in self.stylesheets:
|
||||||
stylesheets.append(CSS(string=sheet))
|
stylesheets.append(CSS(string=sheet or ''))
|
||||||
|
|
||||||
html = HTML(
|
html = HTML(
|
||||||
string=getattr(self, '{}_html'.format(element)),
|
string=getattr(self, '{}_html'.format(element)),
|
||||||
|
|
Loading…
Reference in New Issue