about summary refs log tree commit diff
path: root/app/lib/importer/base_importer.rb
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-19 20:28:40 -0500
committerGitHub <noreply@github.com>2023-02-20 02:28:40 +0100
commit21bf32635687770bc0026d769a69f49b89f8a0a2 (patch)
tree9fde82eedc10fe01b9450a2591fc2f530f29c1d6 /app/lib/importer/base_importer.rb
parent597767a9f7ca846be9fbca826aba362f8387a60f (diff)
Autofix Rubocop Rails/Pluck (#23730)
Diffstat (limited to 'app/lib/importer/base_importer.rb')
-rw-r--r--app/lib/importer/base_importer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/importer/base_importer.rb b/app/lib/importer/base_importer.rb
index ea522c600..0cd1d3422 100644
--- a/app/lib/importer/base_importer.rb
+++ b/app/lib/importer/base_importer.rb
@@ -45,7 +45,7 @@ class Importer::BaseImporter
   # Remove documents from the index that no longer exist in the database
   def clean_up!
     index.scroll_batches do |documents|
-      ids           = documents.map { |doc| doc['_id'] }
+      ids           = documents.pluck('_id')
       existence_map = index.adapter.target.where(id: ids).pluck(:id).each_with_object({}) { |id, map| map[id.to_s] = true }
       tmp           = ids.reject { |id| existence_map[id] }