aboutsummaryrefslogtreecommitdiff
path: root/mongodb.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-03-05 18:30:46 +0100
committercedricbonhomme <devnull@localhost>2012-03-05 18:30:46 +0100
commitc3d0ec7556008a404b9e64fc63b402751d6e0956 (patch)
tree4ebee2dff53f53c89d94caf9e0f7312a4baf7713 /mongodb.py
parentAdded UTF-8 support in CherryPy configuration file (diff)
downloadnewspipe-c3d0ec7556008a404b9e64fc63b402751d6e0956.tar.gz
newspipe-c3d0ec7556008a404b9e64fc63b402751d6e0956.tar.bz2
newspipe-c3d0ec7556008a404b9e64fc63b402751d6e0956.zip
Case insensitive sorting of collections by dict id.
Diffstat (limited to 'mongodb.py')
-rw-r--r--mongodb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mongodb.py b/mongodb.py
index c6f6ee8b..ac107c22 100644
--- a/mongodb.py
+++ b/mongodb.py
@@ -90,7 +90,7 @@ class Articles(object):
cursor = self.db[collection_name].find({"type":0, condition[0]:condition[1]})
if cursor.count() != 0:
feeds.append(cursor.next())
- feeds = sorted(feeds, key=itemgetter('feed_title'))
+ feeds.sort(key = lambda elem: elem['feed_title'].lower())
return feeds
def get_articles_from_collection(self, feed_id, condition=None):
bgstack15