summaryrefslogtreecommitdiff
path: root/src/mailman/model/listmanager.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/model/listmanager.py')
-rw-r--r--src/mailman/model/listmanager.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mailman/model/listmanager.py b/src/mailman/model/listmanager.py
index 8fc739543..7e69064c9 100644
--- a/src/mailman/model/listmanager.py
+++ b/src/mailman/model/listmanager.py
@@ -27,7 +27,9 @@ from mailman.interfaces.address import InvalidEmailAddressError
from mailman.interfaces.listmanager import (
IListManager, ListAlreadyExistsError, ListCreatedEvent, ListCreatingEvent,
ListDeletedEvent, ListDeletingEvent)
-from mailman.model.mailinglist import IAcceptableAliasSet, MailingList
+from mailman.model.autorespond import AutoResponseRecord
+from mailman.model.mailinglist import (
+ IAcceptableAliasSet, ListArchiver, MailingList)
from mailman.model.mime import ContentFilter
from mailman.utilities.datetime import now
from zope.event import notify
@@ -76,7 +78,9 @@ class ListManager:
notify(ListDeletingEvent(mlist))
# First delete information associated with the mailing list.
IAcceptableAliasSet(mlist).clear()
+ store.query(AutoResponseRecord).filter_by(mailing_list=mlist).delete()
store.query(ContentFilter).filter_by(mailing_list=mlist).delete()
+ store.query(ListArchiver).filter_by(mailing_list=mlist).delete()
store.delete(mlist)
notify(ListDeletedEvent(fqdn_listname))