aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers/abstract.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-08 14:39:47 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-08 14:39:47 +0100
commit2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96 (patch)
tree39895c10f68cf0b13d957073268769d04aa924a0 /src/web/controllers/abstract.py
parentCloses section HTML tag. (diff)
downloadnewspipe-2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96.tar.gz
newspipe-2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96.tar.bz2
newspipe-2d72f44a90a76fe7450e59fdfdf4d42f44b9cd96.zip
various improvements to the crawler (better use of coroutines, test if an article should be updated). tags are now retrieved for the k-means clustering (previously achived with the content of articles)
Diffstat (limited to 'src/web/controllers/abstract.py')
-rw-r--r--src/web/controllers/abstract.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/web/controllers/abstract.py b/src/web/controllers/abstract.py
index 58532660..3c91e08a 100644
--- a/src/web/controllers/abstract.py
+++ b/src/web/controllers/abstract.py
@@ -91,11 +91,8 @@ class AbstractController:
obj = self._db_cls(**attrs)
db.session.add(obj)
- try:
- db.session.commit()
- except Exception as e:
- db.session.rollback()
- logger.exception(str(e))
+ db.session.flush()
+ db.session.commit()
return obj
def read(self, **filters):
bgstack15