mirror of
https://github.com/discourse/discourse.git
synced 2025-06-09 15:36:44 +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:
@ -484,7 +484,7 @@ module SiteSettingExtension
|
|||||||
end
|
end
|
||||||
|
|
||||||
define_singleton_method "#{clean_name}=" do |val|
|
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
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user