diff --git a/colandr/apis/resources/studies.py b/colandr/apis/resources/studies.py index 2801b2cb..22a4fb5d 100644 --- a/colandr/apis/resources/studies.py +++ b/colandr/apis/resources/studies.py @@ -255,7 +255,7 @@ class StudiesResource(Resource): ), "page": ma_fields.Int(load_default=0, validate=Range(min=0)), "per_page": ma_fields.Int( - load_default=25, validate=OneOf([10, 25, 50, 100, 5000]) + load_default=25, validate=OneOf([1, 10, 25, 50, 100, 5000]) ), }, location="query", diff --git a/tests/api/test_studies.py b/tests/api/test_studies.py index f80e152c..7ac9f613 100644 --- a/tests/api/test_studies.py +++ b/tests/api/test_studies.py @@ -165,6 +165,8 @@ class TestStudiesResource: (1, {"review_id": 1, "data_extraction_status": "not_started"}, [1]), (1, {"review_id": 1, "order_by": "relevance"}, [1, 2, 3]), (1, {"review_id": 1, "order_by": "recency"}, [1, 2, 3]), + (1, {"review_id": 1, "order_by": "recency", "page": 0, "per_page": 1}, [3]), + (1, {"review_id": 1, "order_by": "recency", "page": 1, "per_page": 1}, [2]), ], ) def test_get(self, current_user_id, params, study_ids, app, client, db_session):