mirror of
https://github.com/rancher/norman.git
synced 2025-08-22 17:15:51 +00:00
do not embed map if empty
This commit is contained in:
parent
7218407a4e
commit
1d27d67ff3
@ -38,7 +38,9 @@ func (e *Embed) ToInternal(data map[string]interface{}) {
|
|||||||
|
|
||||||
delete(data, fieldName)
|
delete(data, fieldName)
|
||||||
}
|
}
|
||||||
|
if len(sub) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
data[e.Field] = sub
|
data[e.Field] = sub
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user