Commit cad6bb36 authored by Terri Chu's avatar Terri Chu

Preload group.parent for project scope searches

parent 572bb8c0
......@@ -623,7 +623,7 @@ class Project < ApplicationRecord
end
def self.with_web_entity_associations
preload(:project_feature, :route, :creator, :group, namespace: [:route, :owner])
preload(:project_feature, :route, :creator, group: :parent, namespace: [:route, :owner])
end
def self.eager_load_namespace_and_owner
......
---
title: Preload group parent to fix N+1 queries for project search
merge_request: 57277
author:
type: performance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment