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
(cherry picked from commit ce65691bfc
)
This commit is contained in:
parent
a153311a5e
commit
97994ae519
|
@ -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…
Reference in New Issue