summaryrefslogtreecommitdiff
path: root/src/mailman/app
diff options
context:
space:
mode:
authorBarry Warsaw2017-05-25 15:35:46 +0000
committerBarry Warsaw2017-05-25 15:35:46 +0000
commit792f1eb7d511b3b4ec8564c9fcbfc87acd0de9a4 (patch)
tree2fd725257bdf566e96a27f2c95d6d4942c0ec3f8 /src/mailman/app
parent3596e9f971e289270ec372266cd0d891b61b56e6 (diff)
parent3df8d5182b44148bbd4b43f5474cd67b2ca699f9 (diff)
downloadmailman-792f1eb7d511b3b4ec8564c9fcbfc87acd0de9a4.tar.gz
mailman-792f1eb7d511b3b4ec8564c9fcbfc87acd0de9a4.tar.zst
mailman-792f1eb7d511b3b4ec8564c9fcbfc87acd0de9a4.zip
Merge branch 'header' into 'master'
Refactor Header object test to create the message without cheating. See merge request !283
Diffstat (limited to 'src/mailman/app')
-rw-r--r--src/mailman/app/moderator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mailman/app/moderator.py b/src/mailman/app/moderator.py
index 03028cb85..0676cb4f5 100644
--- a/src/mailman/app/moderator.py
+++ b/src/mailman/app/moderator.py
@@ -79,7 +79,8 @@ def hold_message(mlist, msg, msgdata=None, reason=None):
msgdata['_mod_message_id'] = message_id
msgdata['_mod_listid'] = mlist.list_id
msgdata['_mod_sender'] = msg.sender
- msgdata['_mod_subject'] = msg.get('subject', _('(no subject)'))
+ # The subject can sometimes be a Header instance. Stringify it.
+ msgdata['_mod_subject'] = str(msg.get('subject', _('(no subject)')))
msgdata['_mod_reason'] = reason
msgdata['_mod_hold_date'] = now().isoformat()
# Now hold this request. We'll use the message_id as the key.