From af8a6c3764659efa285b24ede4759aeb99eb6bcb Mon Sep 17 00:00:00 2001 From: phail Date: Sun, 20 Nov 2022 19:53:57 +0100 Subject: [PATCH] fix filenames --- src/paperless_mail/parsers.py | 4 ++-- src/paperless_mail/tests/test_parsers.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/paperless_mail/parsers.py b/src/paperless_mail/parsers.py index bf67314cb..8f8dd2d37 100644 --- a/src/paperless_mail/parsers.py +++ b/src/paperless_mail/parsers.py @@ -251,7 +251,7 @@ class MailDocumentParser(DocumentParser): with open(css_file, "rb") as css_handle: files = { - "html": ("email_msg_template.html", self.mail_to_html(mail)), + "html": ("index.html", self.mail_to_html(mail)), "css": ("output.css", css_handle), } headers = {} @@ -296,7 +296,7 @@ class MailDocumentParser(DocumentParser): files.append((name_clean, BytesIO(a.payload))) html_clean = html_clean.replace(name_cid, name_clean) - files.append(("email_msg_template.html", StringIO(html_clean))) + files.append(("index.html", StringIO(html_clean))) return files diff --git a/src/paperless_mail/tests/test_parsers.py b/src/paperless_mail/tests/test_parsers.py index 6de97b30e..0d533b4f1 100644 --- a/src/paperless_mail/tests/test_parsers.py +++ b/src/paperless_mail/tests/test_parsers.py @@ -437,7 +437,7 @@ class TestParser(TestCase): result = self.parser.transform_inline_html(html, attachments) resulting_html = result[-1][1].read() - self.assertTrue(result[-1][0] == "email_msg_template.html") + self.assertTrue(result[-1][0] == "index.html") self.assertTrue(result[0][0] in resulting_html) self.assertFalse("