def _extract_suppliers(form):
    """
    Extracts the list of suppliers from the form data
    """
    suppliers = list()
    if form.supplier1.data:
        suppliers.append({'name': form.supplier1.data, 'partno': form.supplier1part.data})
    if form.supplier2.data:
        suppliers.append({'name': form.supplier2.data, 'partno': form.supplier2part.data})
    return suppliers