summaryrefslogtreecommitdiff
path: root/src/mailman/model
diff options
context:
space:
mode:
authorBarry Warsaw2016-01-06 23:22:33 -0500
committerBarry Warsaw2016-01-06 23:22:33 -0500
commit7bb24ce03197e7e4fc561d53ada02bcec73d6057 (patch)
tree8f84b63233f938cbc81c360f563c20694d11e4be /src/mailman/model
parent4c9487d371a3b61de4533a267ee934c86a1b3237 (diff)
downloadmailman-7bb24ce03197e7e4fc561d53ada02bcec73d6057.tar.gz
mailman-7bb24ce03197e7e4fc561d53ada02bcec73d6057.tar.zst
mailman-7bb24ce03197e7e4fc561d53ada02bcec73d6057.zip
A little bit more refactoring, just to keep things cleaner.
Diffstat (limited to 'src/mailman/model')
-rw-r--r--src/mailman/model/requests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman/model/requests.py b/src/mailman/model/requests.py
index 69d8cf199..c7e61299c 100644
--- a/src/mailman/model/requests.py
+++ b/src/mailman/model/requests.py
@@ -29,6 +29,7 @@ from mailman.database.transaction import dbconnection
from mailman.database.types import Enum
from mailman.interfaces.pending import IPendable, IPendings
from mailman.interfaces.requests import IListRequests, RequestType
+from mailman.utilities.queries import QuerySequence
from pickle import dumps, loads
from sqlalchemy import Column, ForeignKey, Integer, Unicode
from sqlalchemy.orm import relationship
@@ -87,8 +88,9 @@ class ListRequests:
@dbconnection
def of_type(self, store, request_type):
- return store.query(_Request).filter_by(
- mailing_list=self.mailing_list, request_type=request_type)
+ return QuerySequence(
+ store.query(_Request).filter_by(
+ mailing_list=self.mailing_list, request_type=request_type))
@dbconnection
def hold_request(self, store, request_type, key, data=None):