From 9a7099d2aaf9433c174d47a1a169c2be36bf3142 Mon Sep 17 00:00:00 2001 From: "Kevin S. Hahn" <kevinshahn@gmail.com> Date: Tue, 14 Apr 2015 11:36:13 -0700 Subject: [PATCH] adapts to pymongo2.6+ aggregation result as cursor --- collections_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collections_.py b/collections_.py index 4005b642..c34c49fc 100644 --- a/collections_.py +++ b/collections_.py @@ -294,7 +294,7 @@ class CollectionSessions(sessions.Sessions): agg_res = self.app.db.acquisitions.aggregate([ {'$match': {'collections': _id}}, {'$group': {'_id': '$session'}}, - ])['result'] + ]) query = {'_id': {'$in': [ar['_id'] for ar in agg_res]}} projection = {'label': 1, 'subject.code': 1, 'notes': 1} projection['permissions'] = {'$elemMatch': {'_id': self.uid, 'site': self.source_site}} -- GitLab