Fix unscoped being used in the wrong place (#11987)

Regression from #11982
This commit is contained in:
Eugen Rochko 2019-09-28 05:23:32 +02:00 committed by GitHub
parent 561b0509c3
commit d8f09d5853

View file

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