From 9b1d18dcf1ea123ec84cb7200e04a41658b9a4b6 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 1 Mar 2020 17:34:24 +0100 Subject: fixed issue with the function to mar all articles of a feed as read. --- newspipe/web/views/article.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/newspipe/web/views/article.py b/newspipe/web/views/article.py index e3a00466..5fdaec3e 100644 --- a/newspipe/web/views/article.py +++ b/newspipe/web/views/article.py @@ -104,12 +104,12 @@ def history(year=None, month=None): @article_bp.route("/mark_as/", methods=["GET"]) @article_bp.route( - "/mark_as//feed/", methods=["GET"] + "/mark_as//feed/", methods=["GET"] ) @login_required def mark_as(new_value="read", feed_id=None, article_id=None): """ - Mark all unreaded articles as read. + Mark a single article or all articles of a feed as read/unread. """ readed = new_value == "read" art_contr = ArticleController(current_user.id) @@ -125,9 +125,9 @@ def mark_as(new_value="read", feed_id=None, article_id=None): art_contr.update(filters, {"readed": readed}) flash(gettext(message % new_value), "info") - if readed: - return redirect(redirect_url()) - return redirect("home") + # if readed: + # return redirect(redirect_url()) + return redirect(url_for("home")) @articles_bp.route("/expire_articles", methods=["GET"]) -- cgit