Fix index not being used in Status.reblogs_map (#11982)

Regression from #11623
lolsob-rspec
Eugen Rochko 2019-09-28 01:33:02 +02:00 committed by GitHub
parent d73822dc01
commit 6baaceefcd
1 changed files with 1 additions and 1 deletions

View File

@ -305,7 +305,7 @@ class Status < ApplicationRecord
end end
def reblogs_map(status_ids, account_id) def reblogs_map(status_ids, account_id)
select('reblog_of_id').where(reblog_of_id: status_ids).where(account_id: account_id).reorder(nil).each_with_object({}) { |s, h| h[s.reblog_of_id] = true } select('reblog_of_id').where(reblog_of_id: status_ids).where(account_id: account_id).unscoped.each_with_object({}) { |s, h| h[s.reblog_of_id] = true }
end end
def mutes_map(conversation_ids, account_id) def mutes_map(conversation_ids, account_id)