diff options
author | Stephen Finucane <stephen@that.guru> | 2017-02-07 21:46:35 +0000 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2017-03-01 22:10:57 +0000 |
commit | 41790caf59adfbbc488e8a62f218ddad0f15a9e4 (patch) | |
tree | a9b11cff0e857dd45e6a2e6ebb0c5a3a551e2923 | |
parent | 50f6b1ead7d904519ef09acf857d75e7c5f20e16 (diff) | |
download | patchwork-41790caf59adfbbc488e8a62f218ddad0f15a9e4.tar patchwork-41790caf59adfbbc488e8a62f218ddad0f15a9e4.tar.gz |
REST: Limit max page size
If this isn't set it's possible to set any page size. Let's restrict
this to the value set in settings.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Cc: Andy Doan <andy.doan@linaro.org>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
-rw-r--r-- | patchwork/api/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/patchwork/api/base.py b/patchwork/api/base.py index dbd8148..0797990 100644 --- a/patchwork/api/base.py +++ b/patchwork/api/base.py @@ -32,7 +32,7 @@ class LinkHeaderPagination(PageNumberPagination): https://tools.ietf.org/html/rfc5988#section-5 https://developer.github.com/guides/traversing-with-pagination """ - page_size = settings.REST_RESULTS_PER_PAGE + page_size = max_page_size = settings.REST_RESULTS_PER_PAGE page_size_query_param = 'per_page' def get_paginated_response(self, data): |