FIX: nil and blank string should not override a site setting
This commit is contained in:
parent
0e02d24428
commit
da419326be
|
@ -121,7 +121,8 @@ module SiteSettingExtension
|
|||
# exists it will be used instead of the setting and the setting will be hidden.
|
||||
# Useful for things like API keys on multisite.
|
||||
if opts[:shadowed_by_global] && GlobalSetting.respond_to?(name)
|
||||
unless (val = GlobalSetting.send(name)) == ''.freeze
|
||||
val = GlobalSetting.send(name)
|
||||
unless val.nil? || (val == ''.freeze)
|
||||
hidden_settings << name
|
||||
shadowed_settings << name
|
||||
current_value = val
|
||||
|
|
Loading…
Reference in New Issue