diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-18 18:52:49 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-18 18:52:49 +0100 |
commit | 94ee39c28aab7163ebb277dcde1e2f07ecba4805 (patch) | |
tree | eab1a161fb643256650f39c0124d5f3146ac5850 /pyaggr3g470r | |
parent | Sort articles for the page /inactives. (diff) | |
download | newspipe-94ee39c28aab7163ebb277dcde1e2f07ecba4805.tar.gz newspipe-94ee39c28aab7163ebb277dcde1e2f07ecba4805.tar.bz2 newspipe-94ee39c28aab7163ebb277dcde1e2f07ecba4805.zip |
No need to sort the list of articles by date.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r-- | pyaggr3g470r/views.py | 3 |
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)) |