Skip to content

Commit cad704d

Browse files
authored
Update pkg/customresourcestate/registry_factory.go
1 parent d7d2d89 commit cad704d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/customresourcestate/registry_factory.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,12 +732,9 @@ func toFloat64(value interface{}, nilIsZero bool) (float64, error) {
732732
if normalized == "true" || normalized == "yes" {
733733
return 1, nil
734734
}
735-
if normalized == "false" || normalized == "no" {
735+
if normalized == "false" || normalized == "no" || normalized == "unknown" {
736736
return 0, nil
737737
}
738-
if normalized == "unknown" {
739-
return -1, nil
740-
}
741738
// The string contains a RFC3339 timestamp
742739
if t, e := time.Parse(time.RFC3339, value.(string)); e == nil {
743740
return float64(t.Unix()), nil

0 commit comments

Comments
 (0)