cel: fix conversion of quantity to quantity
The code in ConvertToType checked for conversion into typeValue (= "kubernetes.URL") instead of conversion into quantityTypeValue (= "kubernetes.Quantity") and thus most likely failed with an incorrect "type conversion error". Kubernetes-commit: 02b4e99c9f0afa4ef9fa0283670c1515e40a5278
This commit is contained in:
parent
32d42093a4
commit
561da9109f
|
|
@ -50,7 +50,7 @@ func (d Quantity) ConvertToNative(typeDesc reflect.Type) (interface{}, error) {
|
||||||
|
|
||||||
func (d Quantity) ConvertToType(typeVal ref.Type) ref.Val {
|
func (d Quantity) ConvertToType(typeVal ref.Type) ref.Val {
|
||||||
switch typeVal {
|
switch typeVal {
|
||||||
case typeValue:
|
case quantityTypeValue:
|
||||||
return d
|
return d
|
||||||
case types.TypeType:
|
case types.TypeType:
|
||||||
return quantityTypeValue
|
return quantityTypeValue
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue