From 74638bbd6e524bd9ef9ed9ca906f2f05ca7a18ca Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 28 Mar 2024 21:15:05 -0700 Subject: [PATCH] fix: config json backward compatibility issue --- backend/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/main.py b/backend/main.py index 4c13c0cd9..1123f6dcb 100644 --- a/backend/main.py +++ b/backend/main.py @@ -168,7 +168,11 @@ async def get_app_config(): "status": True, "name": WEBUI_NAME, "version": VERSION, - "default_locale": CONFIG_DATA["ui"]["default_locale"], + "default_locale": ( + CONFIG_DATA["ui"]["default_locale"] + if "default_locale" in CONFIG_DATA["ui"] + else "en-US" + ), "images": images_app.state.ENABLED, "default_models": webui_app.state.DEFAULT_MODELS, "default_prompt_suggestions": webui_app.state.DEFAULT_PROMPT_SUGGESTIONS,