diff options
| author | Barry Warsaw | 2015-04-15 10:05:35 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-04-15 10:05:35 -0400 |
| commit | 67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c (patch) | |
| tree | 97eca0ae33c97015e4d2fca31e7792e2a929fa8d /src/mailman/model/pending.py | |
| parent | 7317b94a0b746f0287ecbc5654ec544ce0112adb (diff) | |
| parent | 3e7dffa750a3e7bb15ac10b711832696554ba03a (diff) | |
| download | mailman-67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c.tar.gz mailman-67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c.tar.zst mailman-67fd8d6dbcf8849b3c2f8cb42a10aed465ace76c.zip | |
Diffstat (limited to 'src/mailman/model/pending.py')
| -rw-r--r-- | src/mailman/model/pending.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mailman/model/pending.py b/src/mailman/model/pending.py index 77b68bd2d..bbe95d5f0 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,8 @@ class Pendings: for keyvalue in q: store.delete(keyvalue) store.delete(pending) + + @property + @dbconnection + def count(self, store): + return store.query(Pended).count() |
