]> cat aescling's git repositories - mastodon.git/commitdiff
Get rid of Chewy order/limit warning (#8355)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 22 Aug 2018 00:44:56 +0000 (02:44 +0200)
committerGitHub <noreply@github.com>
Wed, 22 Aug 2018 00:44:56 +0000 (02:44 +0200)
app/chewy/statuses_index.rb

index 8bf5b4af7cf52cb9a35f3106756f9b88f08f6707..d3104172c485d1d7b3feaf006857993425bd27c6 100644 (file)
@@ -31,7 +31,7 @@ class StatusesIndex < Chewy::Index
     },
   }
 
-  define_type ::Status.without_reblogs do
+  define_type ::Status.unscoped.without_reblogs do
     crutch :mentions do |collection|
       data = ::Mention.where(status_id: collection.map(&:id)).pluck(:status_id, :account_id)
       data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) }