diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2012-11-30 14:32:18 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2012-11-30 14:32:18 +0100 |
commit | 4f28f627d7aabf89e7d32ae8a0451e65b32759bd (patch) | |
tree | eb9f51337788d95240c6250dcf664c751dcedba5 /source/mongodb.py | |
parent | Performance MongoDB imptovements (get_gavorites() function). (diff) | |
download | newspipe-4f28f627d7aabf89e7d32ae8a0451e65b32759bd.tar.gz newspipe-4f28f627d7aabf89e7d32ae8a0451e65b32759bd.tar.bz2 newspipe-4f28f627d7aabf89e7d32ae8a0451e65b32759bd.zip |
List of favorites articles is now always sorted by date.
Diffstat (limited to 'source/mongodb.py')
-rw-r--r-- | source/mongodb.py | 2 |
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(): |