fix: create .env file if missing when saving API keys

Docker users don't have a .env file by default, so the settings
page silently failed to save keys. Now creates it automatically.


Former-commit-id: 1d0ccdd55a
This commit is contained in:
anoracleofra-code
2026-03-09 07:51:59 -06:00
parent a57c9be0cb
commit bf0da2c434
+1 -1
View File
@@ -167,7 +167,7 @@ def update_api_key(env_key: str, new_value: str) -> bool:
return False
if not ENV_PATH.exists():
return False
ENV_PATH.write_text("", encoding="utf-8")
# Update os.environ immediately
os.environ[env_key] = new_value