diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-10 17:25:26 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-10 17:55:03 +0300 |
commit | b9c12be5b932245a0c7e77b953c20ef379f0ef94 (patch) | |
tree | 0c801b336ff53a75e91fb297b2db15ef13e59243 /app/serializers/group_child_entity.rb | |
parent | 6f5a2276d77dc556bebb39c5992a6fd16ed376be (diff) |
Don't preload all memberships for a user
Diffstat (limited to 'app/serializers/group_child_entity.rb')
-rw-r--r-- | app/serializers/group_child_entity.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/group_child_entity.rb b/app/serializers/group_child_entity.rb index 2f24ca9c4db..5c1fa72b1ac 100644 --- a/app/serializers/group_child_entity.rb +++ b/app/serializers/group_child_entity.rb @@ -72,7 +72,7 @@ class GroupChildEntity < Grape::Entity def membership return unless request.current_user - @membership ||= request.current_user.membership_for_object(object) + @membership ||= request.current_user.members.find_by(source: object) end def project? |