summaryrefslogtreecommitdiffstats
path: root/testapi
diff options
context:
space:
mode:
Diffstat (limited to 'testapi')
-rw-r--r--testapi/opnfv_testapi/resources/handlers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testapi/opnfv_testapi/resources/handlers.py b/testapi/opnfv_testapi/resources/handlers.py
index 0234c8a..5c98c48 100644
--- a/testapi/opnfv_testapi/resources/handlers.py
+++ b/testapi/opnfv_testapi/resources/handlers.py
@@ -127,8 +127,8 @@ class GenericApiHandler(web.RequestHandler):
total_pages += 1
pipelines.append({'$skip': (page - 1) * per_page})
pipelines.append({'$limit': per_page})
- else:
- pipelines.append({'$limit': records_nr})
+ elif last > 0:
+ pipelines.append({'$limit': last})
cursor = self._eval_db(self.table,
'aggregate',