Improve media attached status query (#16105)
This commit is contained in:
parent
7f0c49c58a
commit
1f47511023
3 changed files with 3 additions and 8 deletions
|
@ -42,7 +42,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
|
|||
end
|
||||
|
||||
def only_media_scope
|
||||
Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id)
|
||||
Status.joins(:media_attachments).group(:id)
|
||||
end
|
||||
|
||||
def pinned_scope
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue