Fix panic ObjectIsEmpty for bool

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2025-01-15 10:20:08 +01:00
parent aec61328fc
commit 455d9b65e4
2 changed files with 2 additions and 1 deletions

View File

@@ -135,6 +135,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Format errors in logs as strings. #1563 - Format errors in logs as strings. #1563
- Fix display of profiles during node list. #1496 - Fix display of profiles during node list. #1496
- Fix internal DelProfile function to correctly operate on profiles rather than nodes. #1622 - Fix internal DelProfile function to correctly operate on profiles rather than nodes. #1622
- Fix parsing of bool command line variables #1627
## v4.5.8, 2024-10-01 ## v4.5.8, 2024-10-01

View File

@@ -66,7 +66,7 @@ func ObjectIsEmpty(obj interface{}) bool {
} }
for i := 0; i < varType.NumField(); i++ { for i := 0; i < varType.NumField(); i++ {
if varType.Field(i).Type.Kind() == reflect.String && !varVal.Field(i).IsZero() { if varType.Field(i).Type.Kind() == reflect.String && !varVal.Field(i).IsZero() {
val := varVal.Field(i).Interface().(string) val := varVal.Field(i).String()
if val != "" { if val != "" {
return false return false
} }