def _extract_manufacturers(form):
    """
    Extracts the list of manufacturers from the form data
    """
    manufacturers = list()
    if form.manufacturer1.data:
        manufacturers.append({'name': form.manufacturer1.data, 'partno': form.manufacturer1part.data})
    if form.manufacturer2.data:
        manufacturers.append({'name': form.manufacturer2.data, 'partno': form.manufacturer2part.data})
    return manufacturers