Revision 14402edc snf-cyclades-app/synnefo/logic/servers.py

b/snf-cyclades-app/synnefo/logic/servers.py
699 699
    IPs.
700 700

  
701 701
    """
702
    if not isinstance(networks, list):
703
        raise faults.BadRequest("Malformed request. Invalid 'networks' field")
702 704
    return [_port_for_request(user_id, network) for network in networks]
703 705

  
704 706

  
705 707
def _port_for_request(user_id, network_dict):
708
    if not isinstance(network_dict, dict):
709
        raise faults.BadRequest("Malformed request. Invalid 'networks' field")
706 710
    port_id = network_dict.get("port")
707 711
    network_id = network_dict.get("uuid")
708 712
    if port_id is not None:

Also available in: Unified diff