def _clean_item_list_limit(value):
    """Check that value is a positive integer."""
    int_value = int(value)
    if int_value <= 0:
        raise ValueError('item_list_limit must be positive')
    return int_value