diff options
author | Starfall <us@starfall.systems> | 2021-01-26 16:42:38 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2021-01-26 16:42:38 -0600 |
commit | 3ef928029d94a2b3c6abf96a2935de85c4eed6c8 (patch) | |
tree | d8697b527a0a42e51634b1fef68f0162fe2ccbe2 /app/models/status.rb | |
parent | 65263e6309fb4dea1a93d4b4806af629d317c156 (diff) | |
parent | 52ff3ca675ecac0ff32990b6321fb5e349e6dc59 (diff) |
Merge remote-tracking branch 'glitchsoc/main' into main
Diffstat (limited to 'app/models/status.rb')
-rw-r--r-- | app/models/status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index 766c13a40..836d363ef 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -354,7 +354,7 @@ class Status < ApplicationRecord return if account_ids.empty? - accounts = Account.where(id: account_ids).includes(:account_stat).each_with_object({}) { |a, h| h[a.id] = a } + accounts = Account.where(id: account_ids).includes(:account_stat).index_by(&:id) cached_items.each do |item| item.account = accounts[item.account_id] |