Skip to content
Extraits de code Groupes Projets
Valider 298c81c0 rédigé par abcang's avatar abcang Validation de Eugen Rochko
Parcourir les fichiers

Clear account cache of notification target_status (#6442)

parent cf32f7da
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -69,7 +69,7 @@ class Notification < ApplicationRecord
class << self
def reload_stale_associations!(cached_items)
account_ids = cached_items.map(&:from_account_id).uniq
account_ids = (cached_items.map(&:from_account_id) + cached_items.map { |item| item.target_status&.account_id }.compact).uniq
return if account_ids.empty?
......@@ -77,6 +77,7 @@ class Notification < ApplicationRecord
cached_items.each do |item|
item.from_account = accounts[item.from_account_id]
item.target_status.account = accounts[item.target_status.account_id] if item.target_status
end
end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter