Merge pull request #83 from 0xbyt4/fix/cli-save-config-string-model
fix(cli): prevent crash in save_config_value when model is a string
This commit is contained in:
commit
8174f5a988
1 changed files with 1 additions and 1 deletions
2
cli.py
2
cli.py
|
|
@ -731,7 +731,7 @@ def save_config_value(key_path: str, value: any) -> bool:
|
||||||
keys = key_path.split('.')
|
keys = key_path.split('.')
|
||||||
current = config
|
current = config
|
||||||
for key in keys[:-1]:
|
for key in keys[:-1]:
|
||||||
if key not in current:
|
if key not in current or not isinstance(current[key], dict):
|
||||||
current[key] = {}
|
current[key] = {}
|
||||||
current = current[key]
|
current = current[key]
|
||||||
current[keys[-1]] = value
|
current[keys[-1]] = value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue