From 5bd68281263d71414706ec2f1ccf2ec225358e8f Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 1 Apr 2016 17:58:56 +0200 Subject: commit the session after deleting old articles. --- src/web/views/article.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/web/views') 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()) -- cgit