From 9e5e67ba4f17182edfac0e2ad59bd78377765f36 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 28 Dec 2013 14:52:17 +0100 Subject: Using a for..else loop here. --- pyaggr3g470r/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index d9fb7470..39e4d798 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -392,6 +392,9 @@ def delete_feed(feed_id=None): user.feeds.remove(feed) user.save() flash('Feed "' + feed.title + '" successfully deleted.', 'success') + break + else: + flash('Impossible to delete this feed.', 'danger') return redirect(url_for('home')) @app.route('/profile/', methods=['GET', 'POST']) -- cgit