From 08d8cae4f79bdf0a0773efdd2f795411f280cd1e Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Thu, 14 Jan 2016 16:16:32 +0100 Subject: Delete bans when their associated list is deleted Also add indexes on the Ban fields that are filtered on. --- src/mailman/model/bans.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mailman/model/bans.py') diff --git a/src/mailman/model/bans.py b/src/mailman/model/bans.py index 0a3259167..5894c1aef 100644 --- a/src/mailman/model/bans.py +++ b/src/mailman/model/bans.py @@ -39,8 +39,8 @@ class Ban(Model): __tablename__ = 'ban' id = Column(Integer, primary_key=True) - email = Column(Unicode) - list_id = Column(Unicode) + email = Column(Unicode, index=True) + list_id = Column(Unicode, index=True) def __init__(self, email, list_id): super(Ban, self).__init__() -- cgit v1.2.3-70-g09d2