PERF: Fix broken memoization in `GroupShowSerializer`.
This commit is contained in:
parent
7fc70900d2
commit
468417a716
|
@ -58,6 +58,7 @@ class GroupShowSerializer < BasicGroupSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_group_user
|
def fetch_group_user
|
||||||
@group_user ||= object.group_users.find_by(user: scope.user)
|
return @group_user if defined?(@group_user)
|
||||||
|
@group_user = object.group_users.find_by(user: scope.user)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue