about summary refs log tree commit diff
path: root/app/chewy
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-11-26 01:12:09 +0100
committerGitHub <noreply@github.com>2021-11-26 01:12:09 +0100
commitb4f785c1f46693c4e42b035e6728f99aac1b85db (patch)
treee904eeb81cc2a1cd99dc11d8fbe0ed0e9d766d59 /app/chewy
parent8c2fe2a846dd14914f7faa4bf71be21058249a93 (diff)
parent5f10e64330635bfd609ba5acdd78fa505c12f5b1 (diff)
Merge pull request #1636 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/chewy')
-rw-r--r--app/chewy/tags_index.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/chewy/tags_index.rb b/app/chewy/tags_index.rb
index f811a8d67..f9db2b03a 100644
--- a/app/chewy/tags_index.rb
+++ b/app/chewy/tags_index.rb
@@ -31,7 +31,7 @@ class TagsIndex < Chewy::Index
     end
 
     field :reviewed, type: 'boolean', value: ->(tag) { tag.reviewed? }
-    field :usage, type: 'long', value: ->(tag) { tag.history.reduce(0) { |total, day| total + day[:accounts].to_i } }
+    field :usage, type: 'long', value: ->(tag) { tag.history.reduce(0) { |total, day| total + day.accounts } }
     field :last_status_at, type: 'date', value: ->(tag) { tag.last_status_at || tag.created_at }
   end
 end