]> cat aescling's git repositories - mastodon.git/commitdiff
Fix unscoped being used in the wrong place (#11987)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 28 Sep 2019 03:23:32 +0000 (05:23 +0200)
committerGitHub <noreply@github.com>
Sat, 28 Sep 2019 03:23:32 +0000 (05:23 +0200)
Regression from #11982

app/models/status.rb

index 6afaa14d1435cc4a4c6586cae72c2fb392bdec30..5e74745775d7ffdc83c1a17b7ff24bc1c0d695b8 100644 (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)