

def validate_number(self, number):
    super(FinitePaginator, self).validate_number(number)
    if (not self.object_list):
        if ((number == 1) and 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/original