From 2da7d132fd83a6ba6a4189ef6e102043f0b715fc Mon Sep 17 00:00:00 2001 From: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Date: Wed, 29 Apr 2026 16:57:18 +0530 Subject: [PATCH] [HOTFIX] Bool-parse ENABLE_HIGHLIGHT_API_DEPLOYMENT env var (#1937) [FIX] Bool-parse ENABLE_HIGHLIGHT_API_DEPLOYMENT env var os.environ.get returns the raw string when the variable is set, so ENABLE_HIGHLIGHT_API_DEPLOYMENT="False" was truthy in Python (any non-empty string is truthy). Wrap in CommonUtils.str_to_bool so "False" / "false" / "0" actually evaluate to False. The setting is consumed by the cloud configuration plugin's spec default (ConfigSpec.default in plugins/configuration/cloud_config.py) on cloud and on-prem builds. With this fix, an admin who explicitly sets the env var to a falsy string sees highlight data stripped as expected. Co-authored-by: Claude Opus 4.7 (1M context) --- backend/backend/settings/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/backend/settings/base.py b/backend/backend/settings/base.py index bb62960ae0..279ac463b5 100644 --- a/backend/backend/settings/base.py +++ b/backend/backend/settings/base.py @@ -689,4 +689,6 @@ def filter(self, record): ) raise ValueError(ERROR_MESSAGE) -ENABLE_HIGHLIGHT_API_DEPLOYMENT = os.environ.get("ENABLE_HIGHLIGHT_API_DEPLOYMENT", False) +ENABLE_HIGHLIGHT_API_DEPLOYMENT = CommonUtils.str_to_bool( + os.environ.get("ENABLE_HIGHLIGHT_API_DEPLOYMENT", "False") +)