aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2013-12-28 14:52:17 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2013-12-28 14:52:17 +0100
commit9e5e67ba4f17182edfac0e2ad59bd78377765f36 (patch)
tree5372416c61684b8a80b68650d28873ca344abb37 /pyaggr3g470r
parentAdded comments. (diff)
downloadnewspipe-9e5e67ba4f17182edfac0e2ad59bd78377765f36.tar.gz
newspipe-9e5e67ba4f17182edfac0e2ad59bd78377765f36.tar.bz2
newspipe-9e5e67ba4f17182edfac0e2ad59bd78377765f36.zip
Using a for..else loop here.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/views.py3
1 files changed, 3 insertions, 0 deletions
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'])
bgstack15