summaryrefslogtreecommitdiff
path: root/src/mailman/database
diff options
context:
space:
mode:
authorBarry Warsaw2015-02-13 03:13:06 -0500
committerBarry Warsaw2015-02-13 03:13:06 -0500
commit6d2c66ce133cd2c119fcb462dff662621013631a (patch)
tree8ce6043cc9e95fc9bcb5ba5dab720e8b73a8c56b /src/mailman/database
parent7ffb6d2d43471486997c78c3cffa787a10560ecf (diff)
downloadmailman-6d2c66ce133cd2c119fcb462dff662621013631a.tar.gz
mailman-6d2c66ce133cd2c119fcb462dff662621013631a.tar.zst
mailman-6d2c66ce133cd2c119fcb462dff662621013631a.zip
* A new API is provided to support non-production testing infrastructures,
allowing a client to cull all orphaned UIDs via ``DELETE`` on ``<api>/reserved/uids/orphans``. Note that *no guarantees* of API stability will ever be made for resources under ``reserved``. (LP: #1420083) Also: - Allow @dbconnection methods to be @staticmethods taking only one argument, the store to perform the query on.
Diffstat (limited to 'src/mailman/database')
-rw-r--r--src/mailman/database/transaction.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mailman/database/transaction.py b/src/mailman/database/transaction.py
index 30710017e..b96562d3f 100644
--- a/src/mailman/database/transaction.py
+++ b/src/mailman/database/transaction.py
@@ -70,6 +70,9 @@ def dbconnection(function):
attribute. This calls the function with `store` as the first argument.
"""
def wrapper(*args, **kws):
- # args[0] is self.
- return function(args[0], config.db.store, *args[1:], **kws)
+ # args[0] is self, if there is one.
+ if len(args) > 0:
+ return function(args[0], config.db.store, *args[1:], **kws)
+ else:
+ return function(config.db.store, **kws)
return wrapper