diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 3e5733444..94de8f768 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -431,10 +431,6 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): Receiver().send_message(u'load_song_list') self.close() - def closeEvent(self, event): - self.songmanager.session.rollback() - event.accept() - def processLyrics(self): log.debug(u'processLyrics') sxml = SongXMLBuilder() diff --git a/openlp/plugins/songs/lib/models.py b/openlp/plugins/songs/lib/models.py index d6237e922..350a09751 100644 --- a/openlp/plugins/songs/lib/models.py +++ b/openlp/plugins/songs/lib/models.py @@ -32,7 +32,7 @@ from openlp.plugins.songs.lib.classes import * def init_models(url): engine = create_engine(url) metadata.bind = engine - session = scoped_session(sessionmaker(autoflush=True, + session = scoped_session(sessionmaker(autoflush=False, autocommit=False, bind=engine)) mapper(Author, authors_table) mapper(Book, song_books_table)