

def list(self, request):
    '\n        Returns the list of documents found on the collection\n        '
    pipeline = [{
        '$match': request.args.pop('match', {
            
        }),
    }]
    sort = request.args.pop('sort', {
        
    })
    if sort:
        pipeline.append({
            '$sort': sort,
        })
    project = request.args.pop('project', {
        
    })
    if project:
        pipeline.append({
            '$project': project,
        })
    return Response(serialize(sort.collection.aggregate(pipeline)))

dataset/ETHPy150Open lvieirajr/mongorest/mongorest/resource.py ListResourceMixin.list/VarMisuse@116/154 `self`->`sort`