j
This commit is contained in:
@@ -368,8 +368,8 @@ def save_config(
|
||||
from SYS.database import db, save_config_value
|
||||
|
||||
with db.transaction():
|
||||
# We want to clear and re-save or just update?
|
||||
# For simplicity, we'll iterate and update.
|
||||
# Replace the table contents so removed entries disappear from the DB.
|
||||
db.execute("DELETE FROM config")
|
||||
for key, value in config.items():
|
||||
if key in ('store', 'provider', 'tool'):
|
||||
if isinstance(value, dict):
|
||||
@@ -393,6 +393,7 @@ def save_config(
|
||||
log(f"Failed to save config to database: {e}")
|
||||
|
||||
cache_key = _make_cache_key(config_dir, filename, config_path)
|
||||
clear_config_cache()
|
||||
_CONFIG_CACHE[cache_key] = config
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user