From: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Sun, 20 Nov 2022 17:15:06 +0000 (-0800) Subject: Fixes one more place which used manual size formatting X-Git-Tag: v1.11.0~1^2~35^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d37ebf79ea655197239982d19193c17dd534b46;p=thirdparty%2Fpaperless-ngx.git Fixes one more place which used manual size formatting --- diff --git a/src/paperless_mail/parsers.py b/src/paperless_mail/parsers.py index c9c4e7e90e..bf67314cb6 100644 --- a/src/paperless_mail/parsers.py +++ b/src/paperless_mail/parsers.py @@ -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 ), },