mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-17 07:09:09 +02:00
fix(wger): stop the startup log from naming one database source
wger reads PS_DATABASE_URI before the DJANGO_DB_* variables (settings/main.py on both 2.6 and 2.7), so a user who sets it through env_vars gets a database the DJANGO_DB_* defaults have no part in. The informational line asserted DJANGO_DB_DATABASE unconditionally and printed its value; it now names no single variable and logs no value, since PS_DATABASE_URI carries credentials. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,8 +63,11 @@ if [ "${#SETTINGS_FILES[@]}" -gt 0 ]; then
|
||||
done
|
||||
else
|
||||
# Expected on wger >= 2.7: the settings no longer hardcode a database path,
|
||||
# it is taken from DJANGO_DB_DATABASE instead (set in the Dockerfile)
|
||||
bashio::log.info "Settings do not hardcode a database path, using DJANGO_DB_DATABASE=${DJANGO_DB_DATABASE:-/data/database.sqlite}"
|
||||
# it comes from the environment instead. Which variable wins is decided by
|
||||
# wger, not here: PS_DATABASE_URI takes precedence over the DJANGO_DB_*
|
||||
# defaults set in the Dockerfile, so no single one is named, and no value
|
||||
# is logged (PS_DATABASE_URI carries credentials).
|
||||
bashio::log.info "Settings do not hardcode a database path, the database is taken from the environment"
|
||||
fi
|
||||
|
||||
#####################
|
||||
|
||||
Reference in New Issue
Block a user