aboutsummaryrefslogtreecommitdiff
path: root/src/web/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/views')
-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