summaryrefslogtreecommitdiff
path: root/src/mailman/model/pending.py
diff options
context:
space:
mode:
authorBarry Warsaw2015-04-14 12:46:11 -0400
committerBarry Warsaw2015-04-14 12:46:11 -0400
commit2787473f0bd4ca3efeadb7f44c8f61c3695e7ecd (patch)
tree4ba9e86dd16b53c623410e66c459dc394008b698 /src/mailman/model/pending.py
parent24c01dbd8e93acdc61884b3b9783a0e71fd6df23 (diff)
downloadmailman-2787473f0bd4ca3efeadb7f44c8f61c3695e7ecd.tar.gz
mailman-2787473f0bd4ca3efeadb7f44c8f61c3695e7ecd.tar.zst
mailman-2787473f0bd4ca3efeadb7f44c8f61c3695e7ecd.zip
Diffstat (limited to 'src/mailman/model/pending.py')
-rw-r--r--src/mailman/model/pending.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mailman/model/pending.py b/src/mailman/model/pending.py
index 77b68bd2d..8eb2ab8ba 100644
--- a/src/mailman/model/pending.py
+++ b/src/mailman/model/pending.py
@@ -128,7 +128,7 @@ class Pendings:
return token
@dbconnection
- def confirm(self, store, token, expunge=True):
+ def confirm(self, store, token, *, expunge=True):
# Token can come in as a unicode, but it's stored in the database as
# bytes. They must be ascii.
pendings = store.query(Pended).filter_by(token=str(token))
@@ -165,3 +165,7 @@ class Pendings:
for keyvalue in q:
store.delete(keyvalue)
store.delete(pending)
+
+ @dbconnection
+ def count(self, store):
+ return store.query(Pended).count()