mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:12:26 +08:00
FIX: Show warning only if new value is different (#12893)
A warning is logged when a shadowed site setting is being changed. This should not be the case when the new value is the same as the old one.
This commit is contained in:
parent
286b6916af
commit
3ff9dbb15c
|
@ -484,7 +484,7 @@ module SiteSettingExtension
|
|||
end
|
||||
|
||||
define_singleton_method "#{clean_name}=" do |val|
|
||||
Rails.logger.warn("An attempt was to change #{clean_name} SiteSetting to #{val} however it is shadowed so this will be ignored!")
|
||||
Rails.logger.warn("An attempt was to change #{clean_name} SiteSetting to #{val} however it is shadowed so this will be ignored!") if value != val
|
||||
nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user