1
0
mirror of https://github.com/rancher/types.git synced 2025-09-19 17:15:36 +00:00

Merge pull request #273 from alena1108/nilp

Workload mapper nil pointer fix
This commit is contained in:
Alena Prokharchyk
2018-03-01 21:43:55 -08:00
committed by GitHub

View File

@@ -13,6 +13,9 @@ func (n WorkloadAnnotations) FromInternal(data map[string]interface{}) {
v, ok := values.RemoveValue(data, "workloadAnnotations", "field.cattle.io/publicEndpoints")
if ok {
annotations := convert.ToMapInterface(data["annotations"])
if annotations == nil {
annotations = map[string]interface{}{}
}
annotations["field.cattle.io/publicEndpoints"] = v
}
}