Commits

Anonymous committed 7ecf50d

#868 Test improvements: This is the patch vdm_purge_no_autoflush.diff from David Raznick, corresponding with ckan patch that means we dont need to monkeypatch sqlalchemy.

  • Participants
  • Parent commits 5bb1ef7

Comments (0)

Files changed (1)

vdm/sqlalchemy/tools.py

         logger.debug('Purging revision: %s' % revision.id)
         to_purge = []
         SQLAlchemySession.setattr(self.session, 'revisioning_disabled', True)
+        self.session.autoflush = False
         for o in self.versioned_objects:
             revobj = o.__revision_class__
             items = self.session.query(revobj).filter_by(revision=revision).all()