diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/graphql/resolvers/concerns/looks_ahead.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/graphql/resolvers/concerns/looks_ahead.rb')
-rw-r--r-- | app/graphql/resolvers/concerns/looks_ahead.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/graphql/resolvers/concerns/looks_ahead.rb b/app/graphql/resolvers/concerns/looks_ahead.rb index d468047b539..77a85edfba6 100644 --- a/app/graphql/resolvers/concerns/looks_ahead.rb +++ b/app/graphql/resolvers/concerns/looks_ahead.rb @@ -20,11 +20,11 @@ module LooksAhead includes = preloads.each.flat_map do |name, requirements| selection&.selects?(name) ? requirements : [] end - preloads = (unconditional_includes + includes).uniq + all_preloads = (unconditional_includes + includes).uniq - return query if preloads.empty? + return query if all_preloads.empty? - query.preload(*preloads) # rubocop: disable CodeReuse/ActiveRecord + query.preload(*all_preloads) # rubocop: disable CodeReuse/ActiveRecord end private |