From ee3dea3f552bea200d94773110c035fd3a812c6f Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 5 May 2020 12:39:42 +0200 Subject: [PATCH] fix if logger is not debug --- app/workers/project_indexer_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/project_indexer_worker.rb b/app/workers/project_indexer_worker.rb index aba1d2932..a2749cdf7 100644 --- a/app/workers/project_indexer_worker.rb +++ b/app/workers/project_indexer_worker.rb @@ -9,7 +9,7 @@ class ProjectIndexerWorker logger = Sidekiq.logger.level == Logger::DEBUG ? Sidekiq.logger : nil client = Elasticsearch::Model.client - logger.debug [operation, "ID: #{record_id}"] + logger&.debug [operation, "ID: #{record_id}"] case operation.to_s when /index/