exclude subnets without gateway in create interface
In create interface form, if we select the subnet which don't have gateway ip, the create will fail. we can remove the subnets which don't have gateway ip from the sebnet options to prevent the unnecessary server call. Change-Id: I75cec674516b07e141d74729b545e3d2cadee82d Closes-Bug: #1478939
This commit is contained in:
parent
7794cd53a7
commit
ce65691bfc
@ -76,7 +76,8 @@ class AddInterface(forms.SelfHandlingForm):
|
||||
'%s%s (%s)' % (net_name, subnet.cidr,
|
||||
subnet.name or subnet.id))
|
||||
for subnet in n['subnets']
|
||||
if subnet.id not in router_subnet_ids]
|
||||
if subnet.id not in router_subnet_ids
|
||||
and subnet.gateway_ip]
|
||||
if choices:
|
||||
choices.insert(0, ("", _("Select Subnet")))
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user