mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 05:30:26 +00:00
handle omitted rawExtension
This commit is contained in:
@@ -95,7 +95,7 @@ func (self *Scheme) embeddedObjectToRawExtension(in *EmbeddedObject, out *RawExt
|
||||
// given in conversion.Scope. It's placed in all schemes as a ConversionFunc to enable plugins;
|
||||
// see the comment for RawExtension.
|
||||
func (self *Scheme) rawExtensionToEmbeddedObject(in *RawExtension, out *EmbeddedObject, s conversion.Scope) error {
|
||||
if len(in.RawJSON) == 4 && string(in.RawJSON) == "null" {
|
||||
if len(in.RawJSON) == 0 || (len(in.RawJSON) == 4 && string(in.RawJSON) == "null") {
|
||||
out.Object = nil
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user