# HG changeset patch # User Dirk Olmes # Date 1314004965 -7200 # Node ID 514e5d7dca981c8c5388ca1473b02e26a5f0f774 # Parent a4b2077c9603af2a7e5ee4beb3d2ed877c23312f deleting a feed is now done via the backend diff -r a4b2077c9603 -r 514e5d7dca98 MainWindow.py --- a/MainWindow.py Mon Aug 22 11:02:53 2011 +0200 +++ b/MainWindow.py Mon Aug 22 11:22:45 2011 +0200 @@ -153,8 +153,7 @@ def deleteFeed(self): try: - self.session.delete(self.selectedFeed) - self.session.commit() + self.backend.deleteFeed(self.selectedFeed) self.updateFeedList() except Exception as exception: message = "Error while deleting feed: " + str(exception) diff -r a4b2077c9603 -r 514e5d7dca98 backend/sqlalchemy/SqlAlchemyBackend.py --- a/backend/sqlalchemy/SqlAlchemyBackend.py Mon Aug 22 11:02:53 2011 +0200 +++ b/backend/sqlalchemy/SqlAlchemyBackend.py Mon Aug 22 11:22:45 2011 +0200 @@ -52,6 +52,10 @@ feed.incrementNextUpdateDate() self.session.commit() + def deleteFeed(self, feed): + self.session.delete(feed) + self.session.commit() + def dispose(self): # save all uncommitted state, just in case self.session.commit()