From 5a3b392a1d60f06f3f3d90e2ae379ca76375aac0 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 17 Mar 2019 23:23:23 +0200 Subject: [PATCH] dspace_statistics_api/app.py: Fix Falcon 2.0 syntax See: dspace_statistics_api/app.py --- dspace_statistics_api/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dspace_statistics_api/app.py b/dspace_statistics_api/app.py index cc4b454..27ba312 100644 --- a/dspace_statistics_api/app.py +++ b/dspace_statistics_api/app.py @@ -14,8 +14,8 @@ class AllItemsResource: def on_get(self, req, resp): """Handles GET requests""" # Return HTTPBadRequest if id parameter is not present and valid - limit = req.get_param_as_int("limit", min=0, max=100) or 100 - page = req.get_param_as_int("page", min=0) or 0 + limit = req.get_param_as_int("limit", min_value=0, max_value=100) or 100 + page = req.get_param_as_int("page", min_value=0) or 0 offset = limit * page with DatabaseManager() as db: