Skip to content

Commit

Permalink
Address rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
ellieyhcheng committed Aug 3, 2024
1 parent 01bb519 commit e613e4f
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions lib/tasks/after_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Check warning on line 80 in lib/tasks/after_tasks.rake

View workflow job for this annotation

GitHub Actions / Rubocop

[rubocop] reported by reviewdog 🐶 Avoid comma after the last item of a hash. Raw Output: lib/tasks/after_tasks.rake:80:68: C: Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.
}
}
}
}
}
})
invalid_works = QueryResult.new("Work", es_results)

puts "There are #{invalid_works.size} works with multiple ratings."
Expand Down

0 comments on commit e613e4f

Please sign in to comment.