From 4cd66d7e0cf5a430f02fa35ea7f1ae57561710ac Mon Sep 17 00:00:00 2001 From: Christopher Broderick Date: Sat, 25 Mar 2023 13:21:38 +0000 Subject: [PATCH] Fix import format fail --- helpdesk/email.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpdesk/email.py b/helpdesk/email.py index fdc5f8db..58a666f9 100644 --- a/helpdesk/email.py +++ b/helpdesk/email.py @@ -687,7 +687,8 @@ def extract_part_data( name = f"part-{counter}{ext}" else: name = f"part-{counter}_{name}" - payload = decodeUnknown(part.get_charset(), part.as_bytes()) if part.is_multipart() else part.get_payload(decode=True) + payload = decodeUnknown(part.get_charset(), part.as_bytes( + )) if part.is_multipart() else part.get_payload(decode=True) files.append(SimpleUploadedFile(name, payload, mimetypes.guess_type(name)[0])) logger.debug("Found MIME attachment %s", name) return part_body, part_full_body