mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FIX: Do not raise error if most liked user is deleted
This commit is contained in:
@ -192,10 +192,12 @@ protected
|
||||
|
||||
lookup = AvatarLookup.new(user_ids)
|
||||
user_ids.map do |user_id|
|
||||
lookup_hash = lookup[user_id]
|
||||
|
||||
UserWithCount.new(
|
||||
lookup[user_id].attributes.merge(count: user_hash[user_id])
|
||||
)
|
||||
end.sort_by { |u| -u[:count] }
|
||||
lookup_hash.attributes.merge(count: user_hash[user_id])
|
||||
) if lookup_hash.present?
|
||||
end.compact.sort_by { |u| -u[:count] }
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user