From 4f28f627d7aabf89e7d32ae8a0451e65b32759bd Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 30 Nov 2012 14:32:18 +0100 Subject: List of favorites articles is now always sorted by date. --- source/mongodb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(): -- cgit