gui_settings.py: Handle saving values of None

This commit is contained in:
Mykola Grymalyuk
2024-10-05 12:21:34 -06:00
parent a8f76af6bc
commit 6a58ef1dab
2 changed files with 12 additions and 6 deletions

View File

@@ -430,6 +430,10 @@ class GenerateDefaults:
continue
constants_key = key.replace("GUI:", "")
if plist[key] == "PYTHON_NONE_VALUE":
plist[key] = None
if hasattr(self.constants, constants_key):
logging.info(f"Setting {constants_key} to {plist[key]}")
setattr(self.constants, constants_key, plist[key])