summaryrefslogtreecommitdiff
path: root/src/mailman/database/model.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-07-28 23:10:56 -0400
committerBarry Warsaw2016-07-28 23:10:56 -0400
commit90e84bee5f47cbcdb9e9c367c60a877e325ef3e7 (patch)
treebb7d2df3af049c6e84d65fd25cc0258b6af6ebb9 /src/mailman/database/model.py
parent86b25ba2e3bac0e034235d322c7c77080d737833 (diff)
downloadmailman-90e84bee5f47cbcdb9e9c367c60a877e325ef3e7.tar.gz
mailman-90e84bee5f47cbcdb9e9c367c60a877e325ef3e7.tar.zst
mailman-90e84bee5f47cbcdb9e9c367c60a877e325ef3e7.zip
Diffstat (limited to 'src/mailman/database/model.py')
-rw-r--r--src/mailman/database/model.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman/database/model.py b/src/mailman/database/model.py
index 6019b7488..c2ee90491 100644
--- a/src/mailman/database/model.py
+++ b/src/mailman/database/model.py
@@ -37,7 +37,7 @@ class ModelMeta:
try:
# Delete all the tables in reverse foreign key dependency
# order. http://tinyurl.com/on8dy6f
- for table in reversed(Model.metadata.sorted_tables): # noqa
+ for table in reversed(Model.metadata.sorted_tables):
connection.execute(table.delete())
except:
transaction.rollback()
@@ -46,4 +46,5 @@ class ModelMeta:
transaction.commit()
-public(Model=declarative_base(cls=ModelMeta))
+Model = declarative_base(cls=ModelMeta)
+public(Model=Model)