X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9a57602cd575021709b94ea2fe80c414d482211c..0662b235357dd40b5d27efd06b60044ddcec06f6:/apps/workbench/config/load_config.rb diff --git a/apps/workbench/config/load_config.rb b/apps/workbench/config/load_config.rb index f47c8a8a44..f14c3ca845 100644 --- a/apps/workbench/config/load_config.rb +++ b/apps/workbench/config/load_config.rb @@ -3,7 +3,7 @@ $application_config = {} -%w(application.default application diagnostics).each do |cfgfile| +%w(application.default application).each do |cfgfile| path = "#{::Rails.root.to_s}/config/#{cfgfile}.yml" if File.exists? path yaml = ERB.new(IO.read path).result(binding) @@ -23,11 +23,17 @@ ArvadosWorkbench::Application.configure do ks.each do |kk| cfg = cfg.send(kk) end - if cfg.respond_to?(k.to_sym) and !cfg.send(k).nil? - # Config must have been set already in environments/*.rb. + if v.nil? and cfg.respond_to?(k) and !cfg.send(k).nil? + # Config is nil in *.yml, but has been set already in + # environments/*.rb (or has a Rails default). Don't overwrite + # the default/upstream config with nil. # # After config files have been migrated, this mechanism should - # be deprecated, then removed. + # be removed. + Rails.logger.warn <