Skip to content

fix(dashboard-api): ignore whitespace and comments in _find_env_file_value in config.py - #2513

Open
vaibhavsrv wants to merge 1 commit into
Osmantic:mainfrom
vaibhavsrv:fix/dashboard-api-config-find-env-file-value
Open

fix(dashboard-api): ignore whitespace and comments in _find_env_file_value in config.py#2513
vaibhavsrv wants to merge 1 commit into
Osmantic:mainfrom
vaibhavsrv:fix/dashboard-api-config-find-env-file-value

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Problem

In ods/extensions/services/dashboard-api/config.py, _find_env_file_value() parses .env file lines to extract configuration values. Lines with leading whitespace or commented entries like # ODS_MODE=local were previously evaluated without skipping comments first.

Fix

Update _find_env_file_value() in config.py to strip line whitespace and ignore blank lines or lines starting with #.

Verification

Ran pytest ods/extensions/services/dashboard-api/tests/test_config.py (53/53 passed). git diff --check passed cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant