aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-09-27 09:39:35 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-09-27 09:39:35 +0200
commited57f09611bd46dd92b0c55924296c9e98846b88 (patch)
treeb530c8e920c258644602cb23b44f6c7c045357c0 /src/web
parentFixed a bug with SQLite support. (diff)
downloadnewspipe-ed57f09611bd46dd92b0c55924296c9e98846b88.tar.gz
newspipe-ed57f09611bd46dd92b0c55924296c9e98846b88.tar.bz2
newspipe-ed57f09611bd46dd92b0c55924296c9e98846b88.zip
Fixed a bug when getting the last retrieved article for the generation of the 'Popular feeds' page.
Diffstat (limited to 'src/web')
-rw-r--r--src/web/views/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/views/views.py b/src/web/views/views.py
index b9db05bf..8f92714f 100644
--- a/src/web/views/views.py
+++ b/src/web/views/views.py
@@ -55,9 +55,9 @@ def popular():
# ie: not_added_before = date_last_added_feed - nb_days
nb_days = int(request.args.get('nb_days', 1000))
last_added_feed = FeedController().read().\
- order_by(desc('created_date')).limit(1)
+ order_by(desc('created_date')).limit(1).all()
if last_added_feed:
- date_last_added_feed = last_added_feed.all()[0].created_date
+ date_last_added_feed = last_added_feed[0].created_date
else:
date_last_added_feed = datetime.now()
not_added_before = date_last_added_feed - timedelta(days=nb_days)
bgstack15