def get_chart_error(bands, chart_filter_name):
    """
    Helper fn for insert_chart_data().
    :param bands: list of band dicts, as extracted from chart json.
    :param chart_filter_name: chart-style filter name, as "B" or "Ic" (not "I").
    :return: error if found, zero otherwise [float]
    """
    chart_error = 0  # default if entry for filter not found.
    for i in range(len(bands)):
        if bands[i]['band'] == chart_filter_name:
            chart_error = bands[i]['error'] if bands[i]['error'] is not None else 0
            break
    return chart_error