about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-05-20 22:13:51 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-20 15:13:51 +0200
commitf55480756337dd4df7513e89673e81e003f1201a (patch)
treebfd4aabb606f82f2fe01a16bcceec340ec11ecd3 /app/services
parentd972845ff663605becec1dde904271897fe2e347 (diff)
Use joins for account properties (#3167)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/block_domain_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/block_domain_service.rb b/app/services/block_domain_service.rb
index 3f8f5b385..e8b3a870d 100644
--- a/app/services/block_domain_service.rb
+++ b/app/services/block_domain_service.rb
@@ -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