aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-01 17:58:56 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-01 17:58:56 +0200
commit5bd68281263d71414706ec2f1ccf2ec225358e8f (patch)
tree2e5eb6e50dbb1bfb341f651a1bf86aa99687c491 /src/web
parentUseless if no category set. (diff)
downloadnewspipe-5bd68281263d71414706ec2f1ccf2ec225358e8f.tar.gz
newspipe-5bd68281263d71414706ec2f1ccf2ec225358e8f.tar.bz2
newspipe-5bd68281263d71414706ec2f1ccf2ec225358e8f.zip
commit the session after deleting old articles.
Diffstat (limited to 'src/web')
-rw-r--r--src/web/views/article.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/web/views/article.py b/src/web/views/article.py
index 5b04fe7a..7996e894 100644
--- a/src/web/views/article.py
+++ b/src/web/views/article.py
@@ -6,6 +6,7 @@ from flask import (Blueprint, g, render_template, redirect,
from flask.ext.babel import gettext
from flask.ext.login import login_required
+from bootstrap import db
from web.lib.utils import clear_string, redirect_url
from web.controllers import ArticleController
from web.lib.view_utils import etag_match
@@ -122,5 +123,6 @@ def expire():
'retrieved_date__lt': weeks_ago})
count = query.count()
query.delete()
+ db.session.commit()
flash(gettext('%(count)d articles deleted', count=count), 'info')
return redirect(redirect_url())
bgstack15