Browse Source

Cast status_count to integer (#9314)

It is returned as a double because the sum is now over bigint columns

Fix #9312
Eugen Rochko 9 months ago
parent
commit
0c666ae5e6
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/presenters/instance_presenter.rb

+ 1
- 1
app/presenters/instance_presenter.rb View File

@@ -22,7 +22,7 @@ class InstancePresenter
22 22
   end
23 23
 
24 24
   def status_count
25
-    Rails.cache.fetch('local_status_count') { Account.local.joins(:account_stat).sum('account_stats.statuses_count') }
25
+    Rails.cache.fetch('local_status_count') { Account.local.joins(:account_stat).sum('account_stats.statuses_count') }.to_i
26 26
   end
27 27
 
28 28
   def domain_count

Loading…
Cancel
Save