1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2025-05-18 02:31:54 +02:00

Make sure limit is between 1 and 100

We were not properly checking whether the limit was greater than 0
in all cases.
This commit is contained in:
2020-11-02 21:59:20 +02:00
parent 1904c243a4
commit ca1582a8b6
2 changed files with 2 additions and 2 deletions
dspace_statistics_api

@ -108,7 +108,7 @@ def validate_items_post_parameters(req, resp, resource, params):
else:
raise falcon.HTTPBadRequest(
title="Invalid parameter",
description='The "limit" parameter is invalid. The value must be an integer between 0 and 100.',
description='The "limit" parameter is invalid. The value must be an integer between 1 and 100.',
)
else:
req.context.limit = 100