mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
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".
This commit is contained in:
parent
e798fa67b5
commit
02b4e99c9f
@ -50,7 +50,7 @@ func (d Quantity) ConvertToNative(typeDesc reflect.Type) (interface{}, error) {
|
||||
|
||||
func (d Quantity) ConvertToType(typeVal ref.Type) ref.Val {
|
||||
switch typeVal {
|
||||
case typeValue:
|
||||
case quantityTypeValue:
|
||||
return d
|
||||
case types.TypeType:
|
||||
return quantityTypeValue
|
||||
|
Loading…
Reference in New Issue
Block a user