Skip to content
Snippets Groups Projects
Commit 9a7099d2 authored by Kevin S. Hahn's avatar Kevin S. Hahn
Browse files

adapts to pymongo2.6+ aggregation result as cursor

parent 50589b09
No related branches found
No related tags found
No related merge requests found
......@@ -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}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment