1
0
mirror of https://github.com/rancher/types.git synced 2025-09-16 06:49:21 +00:00

Container ports mapper fix: append as a slice

This commit is contained in:
Alena Prokharchyk
2018-02-26 22:00:33 -08:00
committed by Darren Shepherd
parent 99b97969af
commit ff2b8b9f92

View File

@@ -37,7 +37,7 @@ func (n ContainerPorts) ToInternal(data map[string]interface{}) {
path := []string{"containers", "{ARRAY}", "ports"}
convert.Transform(data, path, func(obj interface{}) interface{} {
if l, ok := obj.([]interface{}); ok {
ports = append(ports, l)
ports = append(ports, l...)
}
return obj
})