fix: per-page needs to be non zero

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
This commit is contained in:
Leonidas Spyropoulos 2023-02-08 15:13:21 +00:00
parent cb16f42a27
commit 45218c4ce7
No known key found for this signature in database
GPG key ID: 59E43E106B247368
2 changed files with 2 additions and 1 deletions

View file

@ -103,7 +103,7 @@ def sanitize_params(offset_str: str, per_page_str: str) -> Tuple[int, int]:
offset = defaults.O
try:
per_page = defaults.PP if int(per_page_str) < 0 else int(per_page_str)
per_page = defaults.PP if int(per_page_str) <= 0 else int(per_page_str)
except ValueError:
per_page = defaults.PP