diff options
Diffstat (limited to 'src/mailman/model/requests.py')
| -rw-r--r-- | src/mailman/model/requests.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/mailman/model/requests.py b/src/mailman/model/requests.py index bd7fe3796..4a3efa67f 100644 --- a/src/mailman/model/requests.py +++ b/src/mailman/model/requests.py @@ -15,13 +15,12 @@ # You should have received a copy of the GNU General Public License along with # GNU Mailman. If not, see <http://www.gnu.org/licenses/>. -"""Implementations of the IRequests and IListRequests interfaces.""" +"""Implementations of the pending requests interfaces.""" from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ - 'Requests', ] @@ -34,7 +33,7 @@ from mailman.config import config from mailman.database.model import Model from mailman.database.types import Enum from mailman.interfaces.pending import IPendable, IPendings -from mailman.interfaces.requests import IListRequests, IRequests, RequestType +from mailman.interfaces.requests import IListRequests, RequestType @@ -91,10 +90,12 @@ class ListRequests: config.db.store.add(request) return request.id - def get_request(self, request_id): + def get_request(self, request_id, request_type=None): result = config.db.store.get(_Request, request_id) if result is None: return None + if request_type is not None and result.request_type != request_type: + return None if result.data_hash is None: return result.key, result.data_hash pendable = getUtility(IPendings).confirm( @@ -113,14 +114,6 @@ class ListRequests: -class Requests: - implements(IRequests) - - def get_list_requests(self, mailing_list): - return ListRequests(mailing_list) - - - class _Request(Model): """Table for mailing list hold requests.""" |
