mirror of
https://github.com/safing/portbase
synced 2025-09-01 18:19:57 +00:00
Fix error handling when setting single config options
This commit is contained in:
parent
50b87e0240
commit
f739d08a40
1 changed files with 4 additions and 0 deletions
|
@ -120,6 +120,8 @@ func setConfigOption(key string, value interface{}, push bool) (err error) {
|
|||
valueCache, vErr := validateValue(option, value)
|
||||
if vErr == nil {
|
||||
option.activeValue = valueCache
|
||||
} else {
|
||||
err = vErr
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,6 +161,8 @@ func setDefaultConfigOption(key string, value interface{}, push bool) (err error
|
|||
valueCache, vErr := validateValue(option, value)
|
||||
if vErr == nil {
|
||||
option.activeDefaultValue = valueCache
|
||||
} else {
|
||||
err = vErr
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue