DEV: Fix build

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

Follow up to db4601823546b7a1451b82a6f556a30a55166a21.
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