aboutsummaryrefslogtreecommitdiff
path: root/app/handlers/base.py
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-06-19 13:29:51 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2014-06-19 13:29:51 +0200
commita4f8081f89e35bd2ff4bdf471391a4e96f3d3069 (patch)
treecc1df08066129f10009d27907fbbc0f6b4d32222 /app/handlers/base.py
parent429ddf4d6bd18ba0cd9bc26ba27a5bf646189ade (diff)
aggregate: Implement limit keyword.
* Make sure that when we pass limit to an aggregate command it returns the exact number of matches. Change-Id: I08a6ce467b24c033b63441544e563a0120f6504a
Diffstat (limited to 'app/handlers/base.py')
-rw-r--r--app/handlers/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/handlers/base.py b/app/handlers/base.py
index ad9792d..2323244 100644
--- a/app/handlers/base.py
+++ b/app/handlers/base.py
@@ -325,7 +325,8 @@ class BaseHandler(RequestHandler):
if unique:
self.log.info("Performing aggregation on %s", unique)
return aggregate(
- self.collection, unique, sort=sort, fields=fields, match=spec
+ self.collection, unique, sort=sort, fields=fields, match=spec,
+ limit=limit
)
else:
return find_and_count(