Skip to content

Commit

Permalink
Fix index not being used in Status.reblogs_map (mastodon#11982)
Browse files Browse the repository at this point in the history
Regression from mastodon#11623
  • Loading branch information
Gargron authored and multiple creatures committed Feb 27, 2020
1 parent b54e626 commit 3acb7ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def bookmarks_map(status_ids, account_id)
end

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

def mutes_map(conversation_ids, account_id)
Expand Down

0 comments on commit 3acb7ff

Please sign in to comment.