summaryrefslogtreecommitdiff
path: root/src/mailman/model/pending.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/model/pending.py')
-rw-r--r--src/mailman/model/pending.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mailman/model/pending.py b/src/mailman/model/pending.py
index dfcc6ea4f..5e5a2af83 100644
--- a/src/mailman/model/pending.py
+++ b/src/mailman/model/pending.py
@@ -151,7 +151,7 @@ class Pendings:
store.delete(pending)
@dbconnection
- def find(self, store, mlist=None, pend_type=None):
+ def find(self, store, mlist=None, pend_type=None, confirm=True):
query = store.query(Pended)
if mlist is not None:
pkv_alias_mlist = aliased(PendedKeyValue)
@@ -166,7 +166,9 @@ class Pendings:
pkv_alias_type.value == pend_type
))
for pending in query:
- yield pending.token, self.confirm(pending.token, expunge=False)
+ pendable = (self.confirm(pending.token, expunge=False)
+ if confirm else None)
+ yield pending.token, pendable
@dbconnection
def __iter__(self, store):