diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-01 17:58:56 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-01 17:58:56 +0200 |
commit | 5bd68281263d71414706ec2f1ccf2ec225358e8f (patch) | |
tree | 2e5eb6e50dbb1bfb341f651a1bf86aa99687c491 /src | |
parent | Useless if no category set. (diff) | |
download | newspipe-5bd68281263d71414706ec2f1ccf2ec225358e8f.tar.gz newspipe-5bd68281263d71414706ec2f1ccf2ec225358e8f.tar.bz2 newspipe-5bd68281263d71414706ec2f1ccf2ec225358e8f.zip |
commit the session after deleting old articles.
Diffstat (limited to 'src')
-rw-r--r-- | src/web/views/article.py | 2 |
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()) |