#2533: fix primaite config recreated when running setup

This commit is contained in:
Czar Echavez
2024-04-30 19:15:54 +01:00
parent 73f64cd89c
commit 729f9c5064
6 changed files with 74 additions and 39 deletions

View File

@@ -28,7 +28,7 @@ def get_primaite_config_dict(config_path: Optional[Path] = None) -> Dict:
def is_dev_mode() -> bool:
"""Returns True if PrimAITE is currently running in developer mode."""
config = get_primaite_config_dict()
return config["developer_mode"]["enabled"]
return config["developer_mode"]["enabled"] if config.get("developer_mode", {}).get("enabled") else False
def update_primaite_config(config: Dict) -> None: