def get_parameter_list_from_request(req,parameter):
    """Extracts a parameter from the request.

    Parameters
    ----------
    req : HttpRequest
        The HTTP request.
    parameter : str
        The parameter being extracted.

    Returns
    -------
    List
        List of comma separated parameters. 
    """
    try:
        id_string= req.GET.get(parameter)
        param_list = list(map(int, id_string.split(',')))
    except (AttributeError, ValueError) as e:
        param_list = []
    return param_list