From 47f5c1e3fdbee3c800efde1e2cb6d85a70def4a3 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 5 Mar 2015 13:40:56 +0100 Subject: Provides to the user a way to set the error count of a feed to 0 by enabling it again. --- pyaggr3g470r/views/views.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pyaggr3g470r/views') diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py index 6e35ccfa..0f1f8765 100644 --- a/pyaggr3g470r/views/views.py +++ b/pyaggr3g470r/views/views.py @@ -563,6 +563,10 @@ def edit_feed(feed_id=None): # Edit an existing feed feed = FeedController(g.user.id).get(id=feed_id) form.populate_obj(feed) + if feed.enabled: + # set the error count to 0 + feed.error_count = 0 + feed.last_error = "" db.session.commit() flash(gettext('Feed successfully updated.'), 'success') return redirect('/edit_feed/' + str(feed_id)) -- cgit