]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fixes one more place which used manual size formatting
authorTrenton Holmes <797416+stumpylog@users.noreply.github.com>
Sun, 20 Nov 2022 17:15:06 +0000 (09:15 -0800)
committerTrenton Holmes <797416+stumpylog@users.noreply.github.com>
Sun, 20 Nov 2022 17:15:06 +0000 (09:15 -0800)
src/paperless_mail/parsers.py

index c9c4e7e90e3c078e42ddcc66af157e28a4a14e98..bf67314cb63caa04880462bd4cef349f7884eeeb 100644 (file)
@@ -85,7 +85,8 @@ class MailDocumentParser(DocumentParser):
                 "prefix": "",
                 "key": "attachments",
                 "value": ", ".join(
-                    f"{attachment.filename}({(attachment.size / 1024):.2f} KiB)"
+                    f"{attachment.filename}"
+                    f"({format_size(attachment.size, binary=True)})"
                     for attachment in mail.attachments
                 ),
             },