summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbhilash Raj2016-12-06 19:27:31 -0800
committerBarry Warsaw2017-01-08 22:52:15 -0500
commit7b3b9d37f94f744c863b6b96f2d75a558357e397 (patch)
treefd3fc9162c8325e99f708cdbb30b68ac1c58cb0d /src
parentc63906e0bfc83fdb9fb0ddfbb54120508b7d0109 (diff)
downloadmailman-7b3b9d37f94f744c863b6b96f2d75a558357e397.tar.gz
mailman-7b3b9d37f94f744c863b6b96f2d75a558357e397.tar.zst
mailman-7b3b9d37f94f744c863b6b96f2d75a558357e397.zip
Diffstat (limited to 'src')
-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 440b977a1..0c164172d 100644
--- a/src/mailman/model/requests.py
+++ b/src/mailman/model/requests.py
@@ -23,7 +23,7 @@ from mailman.database.transaction import dbconnection
from mailman.database.types import Enum, SAUnicode
from mailman.interfaces.pending import IPendable, IPendings
from mailman.interfaces.requests import IListRequests, RequestType
-from mailman.model.pending import Pended
+from mailman.model.pending import Pended, PendedKeyValue
from mailman.utilities.queries import QuerySequence
from pickle import dumps, loads
from public import public
@@ -145,7 +145,9 @@ class ListRequests:
for pended_token in getUtility(IPendings).find(
mlist=self.mailing_list,
confirm=False):
- store.query(Pended).filter_by(token=pended_token).delete()
+ pended = store.query(Pended).filter_by(token=pended_token).first()
+ store.query(PendedKeyValue).filter_by(pended_id=pended.id).delete()
+ store.delete(pended)
class _Request(Model):