From 72a92d86b495602c214a27e09f55f338787331c1 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Tue, 3 Feb 2009 15:47:36 -0800 Subject: Fixed a bug in admindb.py in the implementation of replacing "No Reason Given" with the default rejection reason. Bug #325016. --- Mailman/Cgi/admindb.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Mailman') diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py index a20763f1..117923e0 100644 --- a/Mailman/Cgi/admindb.py +++ b/Mailman/Cgi/admindb.py @@ -34,6 +34,7 @@ from Mailman import Errors from Mailman import Message from Mailman import i18n from Mailman.Handlers.Moderate import ModeratedMemberPost +from Mailman.ListAdmin import HELDMSG from Mailman.ListAdmin import readMessage from Mailman.Cgi import Auth from Mailman.htmlformat import * @@ -769,8 +770,12 @@ def process_form(mlist, doc, cgidata): forwardaddrkey = 'forward-addr-%d' % request_id bankey = 'ban-%d' % request_id # Defaults - msgdata = mlist.GetRecord(request_id)[5] - comment = msgdata.get('rejection_notice', _('[No explanation given]')) + if mlist.GetRecordType(request_id) == HELDMSG: + msgdata = mlist.GetRecord(request_id)[5] + comment = msgdata.get('rejection_notice', + _('[No explanation given]')) + else: + comment = _('[No explanation given]') preserve = 0 forward = 0 forwardaddr = '' -- cgit v1.2.3