diff options
| -rw-r--r-- | src/mailman/model/mailinglist.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mailman/model/mailinglist.py b/src/mailman/model/mailinglist.py index 1d7bdd3a3..6f59a1662 100644 --- a/src/mailman/model/mailinglist.py +++ b/src/mailman/model/mailinglist.py @@ -708,9 +708,8 @@ class HeaderMatchList: @dbconnection def clear(self, store): """See `IHeaderMatchList`.""" - store.query(HeaderMatch).filter( - HeaderMatch.mailing_list == self._mailing_list).delete() - store.expire(self._mailing_list, ['header_matches']) + # http://docs.sqlalchemy.org/en/latest/orm/session_basics.html#deleting-from-collections + del self._mailing_list.header_matches[:] @dbconnection def append(self, store, header, pattern, action=None): |
