1
0
mirror of https://github.com/rancher/types.git synced 2025-09-02 13:45:51 +00:00

Fix namespace attribute on native types

This commit is contained in:
Darren Shepherd
2017-12-19 21:47:20 -07:00
parent fe47f6246e
commit bb9f169d59
5 changed files with 36 additions and 12 deletions

View File

@@ -26,7 +26,11 @@ func (e NamespaceMapper) FromInternal(data map[string]interface{}) {
func (e NamespaceMapper) ToInternal(data map[string]interface{}) {
for name, friendlyName := range namespaceMapping {
value := convert.ToString(data[friendlyName])
obj, ok := data[friendlyName]
if !ok {
continue
}
value := convert.ToString(obj)
if value == "host" {
data[name] = true
} else {