From e613e4fadaa95e5467f0ae5f057f6ac15e217bf3 Mon Sep 17 00:00:00 2001 From: Ellie Cheng Date: Fri, 2 Aug 2024 22:08:31 -0400 Subject: [PATCH] Address rubocop --- lib/tasks/after_tasks.rake | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/lib/tasks/after_tasks.rake b/lib/tasks/after_tasks.rake index 55994e5a12..b924881337 100644 --- a/lib/tasks/after_tasks.rake +++ b/lib/tasks/after_tasks.rake @@ -70,22 +70,20 @@ namespace :After do desc "Clean up multiple rating tags" task(clean_up_multiple_ratings: :environment) do default_rating_tag = Rating.find_by!(name: ArchiveConfig.RATING_DEFAULT_TAG_NAME) - es_results = $elasticsearch.search(index: WorkIndexer.index_name, - body: { - query: { - bool: { - filter: { - script: { - script: { - source: "doc['rating_ids'].length > 1", - lang: "painless" - } - } - } - } - } - } - ) + es_results = $elasticsearch.search(index: WorkIndexer.index_name, body: { + query: { + bool: { + filter: { + script: { + script: { + source: "doc['rating_ids'].length > 1", + lang: "painless", + } + } + } + } + } + }) invalid_works = QueryResult.new("Work", es_results) puts "There are #{invalid_works.size} works with multiple ratings."