From 020e50d0c5d525dc7dfddd8f99a6c6922231be68 Mon Sep 17 00:00:00 2001 From: KMY Date: Fri, 25 Aug 2023 18:04:22 +0900 Subject: [PATCH] Fix status_reference indexing --- app/chewy/statuses_index.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/chewy/statuses_index.rb b/app/chewy/statuses_index.rb index 35ced1d9af..2305ec685a 100644 --- a/app/chewy/statuses_index.rb +++ b/app/chewy/statuses_index.rb @@ -54,7 +54,7 @@ class StatusesIndex < Chewy::Index end crutch :status_references do |collection| - data = ::StatusReference.joins(:status).where(target_status_id: collection.map(&:id), status: { account: Account.local }).pluck(:status_id, :account_id) + data = ::StatusReference.joins(:status).where(target_status_id: collection.map(&:id), status: { account: Account.local }).pluck(:target_status_id, :account_id) data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) } end