mirror of
https://github.com/discourse/discourse.git
synced 2025-02-28 16:29:22 +00:00
PERF: Make use of existing index.
This commit is contained in:
parent
63a88ee6e7
commit
fbc3fcc4af
@ -46,6 +46,6 @@ class BasicGroupSerializer < ApplicationSerializer
|
||||
private
|
||||
|
||||
def fetch_group_user
|
||||
@group_user ||= (object.group_users & scope.user.group_users).first
|
||||
@group_user ||= object.group_users.find_by(user_id: scope.user.id)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user