]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Use parsed subject for mboxes
authorStephen Finucane <stephen@that.guru>
Sat, 7 Apr 2018 16:41:07 +0000 (17:41 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 7 Apr 2018 16:41:07 +0000 (17:41 +0100)
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 <stephen@that.guru>
Fixes: 01b9cbb9 ("Include all email headers in mboxes")
patchwork/views/utils.py

index f5ff43c169ffbb119faf957e50bdbcef50d6bd77..7f89004bedc3a3c667e69fcdbd8d896c740402d4 100644 (file)
@@ -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)