Use joins for account properties (#3167)
This commit is contained in:
parent
d972845ff6
commit
f554807563
6 changed files with 51 additions and 36 deletions
|
@ -60,6 +60,6 @@ class BlockDomainService < BaseService
|
|||
end
|
||||
|
||||
def media_from_blocked_domain
|
||||
MediaAttachment.where(account: blocked_domain_accounts).reorder(nil)
|
||||
MediaAttachment.joins(:account).merge(blocked_domain_accounts).reorder(nil)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue