Fix empty ENV variables not using default nil value (#27400)
This commit is contained in:
parent
82beeb2f7e
commit
e0da64bb4e
2 changed files with 4 additions and 4 deletions
|
@ -3,9 +3,9 @@
|
|||
enabled = ENV['ES_ENABLED'] == 'true'
|
||||
host = ENV.fetch('ES_HOST') { 'localhost' }
|
||||
port = ENV.fetch('ES_PORT') { 9200 }
|
||||
user = ENV.fetch('ES_USER') { nil }
|
||||
password = ENV.fetch('ES_PASS') { nil }
|
||||
fallback_prefix = ENV.fetch('REDIS_NAMESPACE') { nil }
|
||||
user = ENV.fetch('ES_USER', nil).presence
|
||||
password = ENV.fetch('ES_PASS', nil).presence
|
||||
fallback_prefix = ENV.fetch('REDIS_NAMESPACE', nil).presence
|
||||
prefix = ENV.fetch('ES_PREFIX') { fallback_prefix }
|
||||
|
||||
Chewy.settings = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue