summaryrefslogtreecommitdiff
path: root/src/mailman/model/mailinglist.py
diff options
context:
space:
mode:
authorAurélien Bompard2016-02-29 12:08:43 +0100
committerBarry Warsaw2016-02-29 21:52:13 -0500
commit9684f1fc0e8bbe2c41566bf16dab92a0ff0f8b81 (patch)
tree19ccd0ee3a5d7500a4ad97f792a040ece7ffc663 /src/mailman/model/mailinglist.py
parentef9cdf45000b1172c3973b329ebe7ed32d604fb1 (diff)
downloadmailman-9684f1fc0e8bbe2c41566bf16dab92a0ff0f8b81.tar.gz
mailman-9684f1fc0e8bbe2c41566bf16dab92a0ff0f8b81.tar.zst
mailman-9684f1fc0e8bbe2c41566bf16dab92a0ff0f8b81.zip
Diffstat (limited to 'src/mailman/model/mailinglist.py')
-rw-r--r--src/mailman/model/mailinglist.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mailman/model/mailinglist.py b/src/mailman/model/mailinglist.py
index b5c83ff29..7761f2842 100644
--- a/src/mailman/model/mailinglist.py
+++ b/src/mailman/model/mailinglist.py
@@ -643,7 +643,7 @@ class HeaderMatch(Model):
_position = Column('position', Integer, index=True, default=0)
header = Column(Unicode)
pattern = Column(Unicode)
- action = Column(Enum(Action), nullable=True)
+ chain = Column(Unicode, nullable=True)
def __init__(self, **kw):
if 'position' in kw:
@@ -711,7 +711,7 @@ class HeaderMatchList:
del self._mailing_list.header_matches[:]
@dbconnection
- def append(self, store, header, pattern, action=None):
+ def append(self, store, header, pattern, chain=None):
header = header.lower()
existing = store.query(HeaderMatch).filter(
HeaderMatch.mailing_list == self._mailing_list,
@@ -726,20 +726,20 @@ class HeaderMatchList:
last_position = -1
header_match = HeaderMatch(
mailing_list=self._mailing_list,
- header=header, pattern=pattern, action=action,
+ header=header, pattern=pattern, chain=chain,
position=last_position + 1)
store.add(header_match)
store.expire(self._mailing_list, ['header_matches'])
@dbconnection
- def insert(self, store, index, header, pattern, action=None):
- self.append(header, pattern, action)
+ def insert(self, store, index, header, pattern, chain=None):
+ self.append(header, pattern, chain)
# Get the header match that was just added.
header_match = store.query(HeaderMatch).filter(
HeaderMatch.mailing_list == self._mailing_list,
HeaderMatch.header == header.lower(),
HeaderMatch.pattern == pattern,
- HeaderMatch.action == action).one()
+ HeaderMatch.chain == chain).one()
header_match.position = index
store.expire(self._mailing_list, ['header_matches'])