Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit eb51d26

Browse files
committed
Merge pull request #480 from timbyr/HostRoute
[rfr]Allow DNSNameservers and HostRoutes to be removed
2 parents b2653a5 + fa1b308 commit eb51d26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openstack/networking/v2/subnets/requests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ func (opts UpdateOpts) ToSubnetUpdateMap() (map[string]interface{}, error) {
202202
if opts.GatewayIP != "" {
203203
s["gateway_ip"] = opts.GatewayIP
204204
}
205-
if len(opts.DNSNameservers) != 0 {
205+
if opts.DNSNameservers != nil {
206206
s["dns_nameservers"] = opts.DNSNameservers
207207
}
208-
if len(opts.HostRoutes) != 0 {
208+
if opts.HostRoutes != nil {
209209
s["host_routes"] = opts.HostRoutes
210210
}
211211

0 commit comments

Comments
 (0)