Add special case in setting for lists to avoid storing as strings

The `get_list` does a type check if the value returned is a list, and returns default otherwise. Since we were storing everything as a string, if something set a list after the initial migration to toml, that key would then always be returned as the default value
This commit is contained in:
David Muckle committed 2025-11-25 19:19:32 -05:00
1 parent d4ac2fe8b1
commit a667882189
1 file changed
+4 -1
+4 -1
View File
@@ -501,7 +501,10 @@ class Config:
def set(self, key: str, value: Any):
"""Modify a setting and save to disk."""
self.settings[key.lower()] = str(value)
if isinstance(value, list):
self.settings[key.lower()] = value
else:
self.settings[key.lower()] = str(value)
self.save()
def save(self):