aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2012-11-30 14:32:18 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2012-11-30 14:32:18 +0100
commit4f28f627d7aabf89e7d32ae8a0451e65b32759bd (patch)
treeeb9f51337788d95240c6250dcf664c751dcedba5 /source
parentPerformance MongoDB imptovements (get_gavorites() function). (diff)
downloadnewspipe-4f28f627d7aabf89e7d32ae8a0451e65b32759bd.tar.gz
newspipe-4f28f627d7aabf89e7d32ae8a0451e65b32759bd.tar.bz2
newspipe-4f28f627d7aabf89e7d32ae8a0451e65b32759bd.zip
List of favorites articles is now always sorted by date.
Diffstat (limited to 'source')
-rw-r--r--source/mongodb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/mongodb.py b/source/mongodb.py
index 6b15f0fd..1ba69304 100644
--- a/source/mongodb.py
+++ b/source/mongodb.py
@@ -150,7 +150,7 @@ class Articles(object):
# only for a feed
collection = self.db[feed_id]
cursor = collection.find({'type':1, 'article_like':True})
- return cursor
+ return cursor.sort([("article_date", pymongo.DESCENDING)])
else:
favorites = []
for feed_id in self.db.collection_names():
bgstack15