Abhilash Raj pushed to branch master at GNU Mailman / Mailman Core


Commits:
9fba769a by Abhilash Raj at 2019-10-13T07:45:23Z
Make sure we flush all the objects before we delete the tables.

Also, add a super().__init__() to the constructor for Templates model.

- - - - -
c634f06d by Abhilash Raj at 2019-10-13T07:45:24Z
Merge branch 'fix-sqlalchemy' into 'master'

Make sure we flush all the objects before we delete the tables.

See merge request mailman/mailman!569
- - - - -


2 changed files:

- src/mailman/database/model.py
- src/mailman/model/template.py


Changes:

=====================================
src/mailman/database/model.py
=====================================
@@ -32,6 +32,8 @@ class ModelMeta:
     """
     @staticmethod
     def _reset(db):
+        # Make sure we delete/expunge all objects before we drop tables.
+        config.db.store.expunge_all()
         with closing(config.db.engine.connect()) as connection:
             transaction = connection.begin()
             try:


=====================================
src/mailman/model/template.py
=====================================
@@ -55,6 +55,7 @@ class Template(Model):
     password = Column(SAUnicode, nullable=True)
 
     def __init__(self, name, context, uri, username, password):
+        super().__init__()
         self.name = name
         self.context = context
         self.reset(uri, username, password)



View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/1a84468d8f9b93b157370aa1e9e55fa3c0f238ac...c634f06d6d98eb0d4b2bc19fa0239fb0fff1f17f

-- 
View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/1a84468d8f9b93b157370aa1e9e55fa3c0f238ac...c634f06d6d98eb0d4b2bc19fa0239fb0fff1f17f
You're receiving this email because of your account on gitlab.com.


_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to