summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-10 01:45:31 -0500
committerGitHub <noreply@github.com>2021-02-10 01:45:31 -0500
commit055e2dda3a1888d319d542abe8735e791e736451 (patch)
tree31fa336a7dd1301780fe2ab2e863c373e23f8033 /pkg/api/handlers
parent2d829aeb1fe0dc19c45e796141ab78ff192b5dbb (diff)
parentf2a856203117bf97a8dfa5960468ae70e4526e3e (diff)
downloadpodman-055e2dda3a1888d319d542abe8735e791e736451.tar.gz
podman-055e2dda3a1888d319d542abe8735e791e736451.tar.bz2
podman-055e2dda3a1888d319d542abe8735e791e736451.zip
Merge pull request #9295 from Luap99/fix-9293
Fix compat networks endpoint for a empty result
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/compat/networks.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go
index f7a70816f..85d2db87e 100644
--- a/pkg/api/handlers/compat/networks.go
+++ b/pkg/api/handlers/compat/networks.go
@@ -196,7 +196,7 @@ func ListNetworks(w http.ResponseWriter, r *http.Request) {
return
}
- var reports []*types.NetworkResource
+ reports := []*types.NetworkResource{}
logrus.Debugf("netNames: %q", strings.Join(netNames, ", "))
for _, name := range netNames {
report, err := getNetworkResourceByNameOrID(name, runtime, query.Filters)