diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js index a0a93e51d0..20d6856268 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js @@ -475,13 +475,13 @@ function onGetNetworks(data) { model.neutronEnabled = true; model.networks.length = 0; - if (data.data.items.length === 1) { - model.newInstanceSpec.networks.push(data.data.items[0]); - } push.apply(model.networks, data.data.items.filter(function(net) { return net.subnets.length > 0; })); + if (model.networks.length === 1) { + model.newInstanceSpec.networks.push(model.networks[0]); + } return data; }