DEV: Fix build

Rails.logger is not available when Discourse.deprecate is called from
enabled_site_setting_filter.

Follow up to db46018235.
This commit is contained in:
Bianca Nenciu 2020-05-10 15:05:23 +03:00
parent 8149bfbaf1
commit 09caf614de
2 changed files with 2 additions and 2 deletions

View File

@ -801,7 +801,7 @@ module Discourse
redis_key = "deprecate-notice-#{digest}"
if !Discourse.redis.without_namespace.get(redis_key)
Rails.logger.warn(warning) if Rails.logger
Rails.logger.warn(warning)
begin
Discourse.redis.without_namespace.setex(redis_key, 3600, "x")
rescue Redis::CommandError => e

View File

@ -626,7 +626,7 @@ class Plugin::Instance
end
def enabled_site_setting_filter(filter = nil)
Discourse.deprecate("`enabled_site_setting_filter` is deprecated", output_in_test: true)
STDERR.puts("`enabled_site_setting_filter` is deprecated")
end
def enabled_site_setting(setting = nil)