Commit 6556490e authored by dgt's avatar dgt

Remove raw sql from query which will be deprecated in rails 6

parent f7725bc2
......@@ -198,8 +198,7 @@ module User::Cache
# Exclude large groups from calculating peer relationships
group_ids -= Group.large.pluck(:id)
ids = User.joins(:memberships)
.where(memberships: { group_id: group_ids })
.where(memberships: { group_id: group_ids }).distinct.pluck(:id)
ids - [id]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment