PERF: Make use of existing index.
This commit is contained in:
parent
63a88ee6e7
commit
fbc3fcc4af
|
@ -46,6 +46,6 @@ class BasicGroupSerializer < ApplicationSerializer
|
||||||
private
|
private
|
||||||
|
|
||||||
def fetch_group_user
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue