mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Enable unless
cops
We discussed the use of `unless` internally and decided to enforce available rules from rubocop to restrict its most problematic uses.
This commit is contained in:

committed by
Loïc Guitaut

parent
87de3c2319
commit
f7c57fbc19
@ -116,7 +116,7 @@ class ImportScripts::Base
|
||||
def reset_site_settings
|
||||
@old_site_settings.each do |key, value|
|
||||
current_value = SiteSetting.get(key)
|
||||
SiteSetting.set(key, value) unless current_value != @site_settings_during_import[key]
|
||||
SiteSetting.set(key, value) if current_value == @site_settings_during_import[key]
|
||||
end
|
||||
|
||||
RateLimiter.enable
|
||||
|
Reference in New Issue
Block a user