Removed the invalid page number handler in the __set_list method of the Pagination utility. The invalid page numbers are handled and redirected in the __get_page_no method now.
This commit is contained in:
parent
5090e59bb1
commit
3d9e6c10da
@ -129,10 +129,6 @@ class Pagination(t.Generic[T]):
|
||||
self.__default_page_no = self.__total_pages if self.__is_reversed \
|
||||
else 1
|
||||
self.page_no = self.__get_page_no()
|
||||
if self.page_no < 1:
|
||||
self.page_no = 1
|
||||
if self.page_no > self.__total_pages:
|
||||
self.page_no = self.__total_pages
|
||||
lower_bound: int = (self.page_no - 1) * self.page_size
|
||||
upper_bound: int = lower_bound + self.page_size
|
||||
if upper_bound > len(self.__items):
|
||||
|
Loading…
Reference in New Issue
Block a user