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

add displayName to cloud credential and mapper changes for it

This commit is contained in:
kinarashah
2019-09-05 16:43:13 -07:00
committed by Alena Prokharchyk
parent e705052807
commit 86c01d27a8
3 changed files with 10 additions and 0 deletions

View File

@@ -14,6 +14,13 @@ type CredentialMapper struct {
func (s CredentialMapper) FromInternal(data map[string]interface{}) {
formatData(data)
name := convert.ToString(values.GetValueN(data, "name"))
if name == "" {
id := convert.ToString(values.GetValueN(data, "id"))
if id != "" {
data["name"] = id
}
}
delete(data, "data")
}