don't choke on missing setting

pull/6827/head
Markus Kahl 11 years ago
parent c189aacf3d
commit 1a24937869
  1. 6
      lib/omniauth/openid_connect/provider.rb

@ -83,7 +83,11 @@ module OmniAuth
end end
def self.config def self.config
from_settings = Hash(Hash(Setting.plugin_openproject_openid_connect["providers"])[provider_name]) from_settings = if Setting.plugin_openproject_openid_connect.is_a? Hash
Hash(Hash(Setting.plugin_openproject_openid_connect["providers"])[provider_name])
else
{}
end
if from_settings.empty? if from_settings.empty?
Hash(Hash(OpenProject::Configuration["openid_connect"])[provider_name]) Hash(Hash(OpenProject::Configuration["openid_connect"])[provider_name])

Loading…
Cancel
Save