From ed57f09611bd46dd92b0c55924296c9e98846b88 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 27 Sep 2016 09:39:35 +0200 Subject: Fixed a bug when getting the last retrieved article for the generation of the 'Popular feeds' page. --- src/web/views/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit