def _set_current_page(self, current_page, last_page):
        if not current_page:
            current_page = self.resolve_current_page()

        if current_page > last_page:
            if last_page > 0:
                return last_page

            return 1

        if not self._is_valid_page_number(current_page):
            return 1

        return current_page
Get the current page for the request.
dataset/ETHPy150Open sdispater/orator/orator/pagination/length_aware_paginator.py/LengthAwarePaginator._set_current_page