diff --git a/app/workers/score_calculator_worker.rb b/app/workers/score_calculator_worker.rb index 82977994b41f78996c7efc58f684a9f8fd5f1147..5a0e9b820fd7f907d2337a7af81a4f780166b84c 100644 --- a/app/workers/score_calculator_worker.rb +++ b/app/workers/score_calculator_worker.rb @@ -3,7 +3,7 @@ class ScoreCalculatorWorker sidekiq_options queue: :score def perform(id, object_class) - return false unless %w(User LearningObject Collection) + return false unless %w(User LearningObject Collection).include? object_class object = object_class.constantize.find(id)