From bf962b1a328bf005e1265288b8eec9e716cb3402 Mon Sep 17 00:00:00 2001 From: Hojagulyyev Date: Sun, 3 Dec 2023 19:34:22 +0500 Subject: [PATCH] fix: fix bug in paginate function --- rp2/pagination.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rp2/pagination.py b/rp2/pagination.py index 2ba021f..d726dc1 100644 --- a/rp2/pagination.py +++ b/rp2/pagination.py @@ -15,10 +15,10 @@ def paginate( page_size: (int | None) = None, ) -> Any: - if page is None: + if not page: page = DEFAULT_PAGINATION_PAGE - if page_size is None: + if not page_size: page_size = DEFAULT_PAGINATION_PAGE_SIZE if int(page_size) > MAX_PAGE_SIZE: