aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2015-06-12 14:29:47 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2015-06-12 14:29:47 +0200
commit6ce4e978c9faf739706a1199d1d53973785bad57 (patch)
tree4c67721b739f83fc4d26f2ed9012f75a9ed64242 /pyaggr3g470r/views
parentThe bookmarklet to subscribe to a feed has been slightly updated. (diff)
downloadnewspipe-6ce4e978c9faf739706a1199d1d53973785bad57.tar.gz
newspipe-6ce4e978c9faf739706a1199d1d53973785bad57.tar.bz2
newspipe-6ce4e978c9faf739706a1199d1d53973785bad57.zip
No need to display the /duplicates page when there is no duplicate.
Diffstat (limited to 'pyaggr3g470r/views')
-rw-r--r--pyaggr3g470r/views/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py
index d83a9d35..f88e9fa4 100644
--- a/pyaggr3g470r/views/views.py
+++ b/pyaggr3g470r/views/views.py
@@ -447,6 +447,10 @@ def duplicates(feed_id=None):
feed = Feed.query.filter(Feed.user_id == g.user.id, Feed.id == feed_id).first()
duplicates = []
duplicates = utils.compare_documents(feed)
+ if len(duplicates) == 0:
+ flash(gettext('No duplicates in the feed "{}"".').format(feed.title),
+ 'info')
+ return redirect(redirect_url())
return render_template('duplicates.html', duplicates=duplicates, feed=feed)
@app.route('/export', methods=['GET'])
bgstack15