Ticket #868: vdm_purge_no_autoflush.diff
File vdm_purge_no_autoflush.diff, 557 bytes (added by kindly@…, 3 years ago) |
---|
-
vdm/sqlalchemy/tools.py
diff -r 31b1a5b457dd vdm/sqlalchemy/tools.py
a b 171 171 logger.debug('Purging revision: %s' % revision.id) 172 172 to_purge = [] 173 173 SQLAlchemySession.setattr(self.session, 'revisioning_disabled', True) 174 self.session.autoflush = False 174 175 for o in self.versioned_objects: 175 176 revobj = o.__revision_class__ 176 177 items = self.session.query(revobj).filter_by(revision=revision).all()