diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-09-27 09:39:35 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-09-27 09:39:35 +0200 |
commit | ed57f09611bd46dd92b0c55924296c9e98846b88 (patch) | |
tree | b530c8e920c258644602cb23b44f6c7c045357c0 /src/web/views | |
parent | Fixed a bug with SQLite support. (diff) | |
download | newspipe-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/views')
-rw-r--r-- | src/web/views/views.py | 4 |
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) |