mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Fix unnecessary conversions in parameter codec.
This commit is contained in:
parent
0e682ca7cd
commit
fb78390f83
@ -161,11 +161,12 @@ func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.Gro
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
targetGVK := targetGVKs[0]
|
||||
if targetGVK.GroupVersion() == from {
|
||||
return c.convertor.Convert(¶meters, into, nil)
|
||||
for i := range targetGVKs {
|
||||
if targetGVKs[i].GroupVersion() == from {
|
||||
return c.convertor.Convert(¶meters, into, nil)
|
||||
}
|
||||
}
|
||||
input, err := c.creator.New(from.WithKind(targetGVK.Kind))
|
||||
input, err := c.creator.New(from.WithKind(targetGVKs[0].Kind))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user