From: Stephen Finucane Date: Sat, 7 Apr 2018 16:41:07 +0000 (+0100) Subject: Use parsed subject for mboxes X-Git-Tag: v2.1.0-rc1~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2a25342;p=thirdparty%2Fpatchwork.git Use parsed subject for mboxes With a recent change, we started using the original subject header instead of the one we had already cleaned up at the parsing stage. Revert this aspect of that change. Signed-off-by: Stephen Finucane Fixes: 01b9cbb9 ("Include all email headers in mboxes") --- diff --git a/patchwork/views/utils.py b/patchwork/views/utils.py index f5ff43c1..7f89004b 100644 --- a/patchwork/views/utils.py +++ b/patchwork/views/utils.py @@ -101,6 +101,9 @@ def _submission_to_mbox(submission): for key, val in orig_headers.items(): mail[key] = val + # specifically overwrite the subject with our own nicely formatted name + mail['Subject'] = submission.name + if 'Date' not in mail: mail['Date'] = email.utils.formatdate(utc_timestamp)