mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 09:07:18 +01:00
Fixes generation of thumbnails when the archive file hasn't already been created
This commit is contained in:
parent
0880420ef6
commit
0d6e79cb93
2 changed files with 4 additions and 7 deletions
|
|
@ -33,7 +33,9 @@ class MailDocumentParser(DocumentParser):
|
|||
|
||||
def get_thumbnail(self, document_path: Path, mime_type: str, file_name=None):
|
||||
if not self.archive_path:
|
||||
self.archive_path = self.generate_pdf(document_path)
|
||||
self.archive_path = self.generate_pdf(
|
||||
self.parse_file_to_message(document_path),
|
||||
)
|
||||
|
||||
return make_thumbnail_from_pdf(
|
||||
self.archive_path,
|
||||
|
|
@ -300,9 +302,6 @@ class MailDocumentParser(DocumentParser):
|
|||
css_file = Path(__file__).parent / "templates" / "output.css"
|
||||
email_html_file = self.mail_to_html(mail)
|
||||
|
||||
print(css_file)
|
||||
print(email_html_file)
|
||||
|
||||
with css_file.open("rb") as css_handle, email_html_file.open(
|
||||
"rb",
|
||||
) as email_html_handle:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue