diff --git a/core/memstore/memstore.go b/core/memstore/memstore.go index 6ca821f2..ed6bd78b 100644 --- a/core/memstore/memstore.go +++ b/core/memstore/memstore.go @@ -274,9 +274,22 @@ func (r *Store) GetBoolDefault(key string, def bool) (bool, error) { if v == nil { return def, nil } + + if vBoolean, ok := v.(bool); ok { + return vBoolean, nil + } + if vString, ok := v.(string); ok { return strconv.ParseBool(vString) } + + if vInt, ok := v.(int); ok { + if vInt == 1 { + return true, nil + } + return false, nil + } + return def, nil }