diff options
| author | Barry Warsaw | 2017-01-09 05:37:13 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2017-01-09 05:37:13 +0000 |
| commit | 089fb5f5612f5b25fb5c3bea94d671c45ecea9df (patch) | |
| tree | e077c807084e5f15ea92f4748ffa6bf7e2df92f7 /src/mailman/model/pending.py | |
| parent | 609739ee390447a8feb99bb52d13c6e3f0bf3caa (diff) | |
| parent | a01ef2bac4d52da67e4be1fccc2634086aaa03e3 (diff) | |
| download | mailman-089fb5f5612f5b25fb5c3bea94d671c45ecea9df.tar.gz mailman-089fb5f5612f5b25fb5c3bea94d671c45ecea9df.tar.zst mailman-089fb5f5612f5b25fb5c3bea94d671c45ecea9df.zip | |
Diffstat (limited to 'src/mailman/model/pending.py')
| -rw-r--r-- | src/mailman/model/pending.py | 6 |
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): |
