fdf
This commit is contained in:
@@ -10,7 +10,16 @@ from textual.screen import ModalScreen
|
||||
from textual.widgets import Static, Button, Input, Label, ListView, ListItem, Rule, Select, Checkbox
|
||||
from pathlib import Path
|
||||
|
||||
from SYS.config import load_config, save_config, save_config_and_verify, reload_config, global_config, count_changed_entries, ConfigSaveConflict
|
||||
from SYS.config import (
|
||||
load_config,
|
||||
save_config,
|
||||
save_config_and_verify,
|
||||
reload_config,
|
||||
global_config,
|
||||
count_changed_entries,
|
||||
ConfigSaveConflict,
|
||||
coerce_config_value,
|
||||
)
|
||||
from SYS.database import db
|
||||
from SYS.logger import log, debug
|
||||
from Store.registry import _discover_store_classes, _required_keys_for
|
||||
@@ -1142,15 +1151,7 @@ class ConfigModal(ModalScreen):
|
||||
return
|
||||
|
||||
# Try to preserve boolean/integer types
|
||||
processed_value = raw_value
|
||||
if isinstance(raw_value, str):
|
||||
low = raw_value.lower()
|
||||
if low == "true":
|
||||
processed_value = True
|
||||
elif low == "false":
|
||||
processed_value = False
|
||||
elif raw_value.isdigit():
|
||||
processed_value = int(raw_value)
|
||||
processed_value = coerce_config_value(raw_value, existing_value)
|
||||
|
||||
if widget_id.startswith("global-"):
|
||||
self.config_data[key] = processed_value
|
||||
|
||||
Reference in New Issue
Block a user