Mercurial > hg > Feedworm
changeset 125:514e5d7dca98 backend
deleting a feed is now done via the backend
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 22 Aug 2011 11:22:45 +0200 |
parents | a4b2077c9603 |
children | 089ee60b28fb |
files | MainWindow.py backend/sqlalchemy/SqlAlchemyBackend.py |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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()