Commit 84afe493 authored by mathieui's avatar mathieui

fix: restore toggle & get previous behavior

parent c0c0155b
......@@ -203,9 +203,7 @@ class Config:
returned
"""
if default is None:
section_val = self.default.get(section)
if section_val is not None:
default = section_val.get(option)
default = self.default.get(section, {}).get(option, '')
res: Optional[ConfigValue]
try:
......@@ -483,7 +481,7 @@ class Config:
if isinstance(value, str) and value == "toggle":
current = self.getbool(option, section)
if isinstance(current, bool):
value = str(not current)
value = str(not current).lower()
else:
if current.lower() == "false":
value = "true"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment