aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-11-18 18:52:49 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-11-18 18:52:49 +0100
commit94ee39c28aab7163ebb277dcde1e2f07ecba4805 (patch)
treeeab1a161fb643256650f39c0124d5f3146ac5850
parentSort articles for the page /inactives. (diff)
downloadnewspipe-94ee39c28aab7163ebb277dcde1e2f07ecba4805.tar.gz
newspipe-94ee39c28aab7163ebb277dcde1e2f07ecba4805.tar.bz2
newspipe-94ee39c28aab7163ebb277dcde1e2f07ecba4805.zip
No need to sort the list of articles by date.
-rw-r--r--pyaggr3g470r/views.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 87a0cec4..991e25b0 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -215,8 +215,7 @@ def inactives():
today = datetime.datetime.now()
inactives = []
for feed in user.feeds:
- last_post = sorted(feed.articles, key=lambda t: t.date,
-reverse=True)[0].date
+ last_post = feed.articles[0].date
elapsed = today - last_post
if elapsed > datetime.timedelta(days=nb_days):
inactives.append((feed, elapsed))
bgstack15