def validate_number(self, number):
        super(FinitePaginator, self).validate_number(number)
        # check for an empty list to see if the page exists
        if not self.object_list:
            if number == 1 or self.allow_empty_first_page:
                pass
            else:
                raise EmptyPage('That page contains no results')
        return number
dataset/ETHPy150Open amarandon/smeuhsocial/apps/pagination/paginator.py/FinitePaginator.validate_number/operator `and` -> `or`