diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2016-01-31 18:59:36 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-31 18:59:36 +0100 |
commit | 64964d2fcfa73e18b1316d788bacd11e2180bb7d (patch) | |
tree | 9c11cbd18ae6bf3a8c852c5e66a7eeb0e131c115 /src/web/views | |
parent | saving categ (diff) | |
download | newspipe-64964d2fcfa73e18b1316d788bacd11e2180bb7d.tar.gz newspipe-64964d2fcfa73e18b1316d788bacd11e2180bb7d.tar.bz2 newspipe-64964d2fcfa73e18b1316d788bacd11e2180bb7d.zip |
handling errors from one page app
Diffstat (limited to 'src/web/views')
-rw-r--r-- | src/web/views/feed.py | 8 | ||||
-rw-r--r-- | src/web/views/views.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/web/views/feed.py b/src/web/views/feed.py index 959179f9..1b6c8654 100644 --- a/src/web/views/feed.py +++ b/src/web/views/feed.py @@ -88,11 +88,9 @@ def delete(feed_id=None): @login_required def reset_errors(feed_id): feed_contr = FeedController(g.user.id) - feed = feed_contr.get(id=feed_id) - feed_contr.update({'id': feed_id}, {'error_count': 0, 'last_error': ''}) - flash(gettext('Feed %(feed_title)r successfully updated.', - feed_title=feed.title), 'success') - return redirect(request.referrer or url_for('home')) + feed_contr.update({'id': feed_id}, + {'error_count': 0, 'last_error': ''}) + return '' @feed_bp.route('/bookmarklet', methods=['GET', 'POST']) diff --git a/src/web/views/views.py b/src/web/views/views.py index e09d2696..0ae37a8d 100644 --- a/src/web/views/views.py +++ b/src/web/views/views.py @@ -263,6 +263,8 @@ def get_menu(): categories[feed['category_id']]['feeds'].append(feed_id) return jsonify(**{'feeds': feeds, 'categories': categories, 'crawling_method': conf.CRAWLING_METHOD, + 'max_error': conf.DEFAULT_MAX_ERROR, + 'error_threshold': conf.ERROR_THRESHOLD, 'is_admin': g.user.is_admin(), 'all_unread_count': sum(unread.values())}) |