Fix panic ObjectIsEmpty for bool
Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user