diff options
| author | Barry Warsaw | 2016-01-06 23:22:33 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2016-01-06 23:22:33 -0500 |
| commit | 7bb24ce03197e7e4fc561d53ada02bcec73d6057 (patch) | |
| tree | 8f84b63233f938cbc81c360f563c20694d11e4be /src/mailman/model | |
| parent | 4c9487d371a3b61de4533a267ee934c86a1b3237 (diff) | |
| download | mailman-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.py | 6 |
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): |
