Update settings.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jan Tomášek 2025-12-10 10:27:44 +01:00 committed by GitHub
parent 2400dd5882
commit 01096c1813
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,7 +36,7 @@ def get_default_value(name: str, value: T) -> T:
# Normalize type to match value param type
try:
if isinstance(value, bool):
return env_value.lower() in ('true', '1', 'yes', 'on') # type: ignore
return env_value.strip().lower() in ('true', '1', 'yes', 'on') # type: ignore
elif isinstance(value, dict):
return json.loads(env_value) # type: ignore
elif isinstance(value, str):