about summary refs log tree commit diff
path: root/app/presenters/instance_presenter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters/instance_presenter.rb')
-rw-r--r--app/presenters/instance_presenter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb
index 5d22962cf..d8670f124 100644
--- a/app/presenters/instance_presenter.rb
+++ b/app/presenters/instance_presenter.rb
@@ -18,11 +18,11 @@ class InstancePresenter
   end
 
   def user_count
-    Rails.cache.fetch('user_count') { User.confirmed.count }
+    Rails.cache.fetch('user_count') { User.confirmed.joins(:account).merge(Account.without_suspended).count }
   end
 
   def status_count
-    Rails.cache.fetch('local_status_count') { Account.local.sum(:statuses_count) }
+    Rails.cache.fetch('local_status_count') { Account.local.joins(:account_stat).sum('account_stats.statuses_count') }.to_i
   end
 
   def domain_count