Commit 97083e16 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch '227785-foss-failure-in-spec-requests-api-search_spec-rb' into 'master'

Resolve "FOSS failure in spec/requests/api/search_spec.rb"  [RUN AS-IF-FOSS]

Closes #227785

See merge request gitlab-org/gitlab!36550
parents 00be0657 db9a8965
......@@ -522,11 +522,6 @@ class Project < ApplicationRecord
.where(project_pages_metadata: { project_id: nil })
end
scope :with_api_entity_associations, -> {
preload(:project_feature, :route, :tags,
group: [:ip_restrictions, :saml_provider], namespace: [:route, :owner])
}
scope :with_api_commit_entity_associations, -> {
preload(:project_feature, :route, namespace: [:route, :owner])
}
......@@ -545,6 +540,10 @@ class Project < ApplicationRecord
# Used by Projects::CleanupService to hold a map of rewritten object IDs
mount_uploader :bfg_object_map, AttachmentUploader
def self.with_api_entity_associations
preload(:project_feature, :route, :tags, :group, namespace: [:route, :owner])
end
def self.with_web_entity_associations
preload(:project_feature, :route, :creator, :group, namespace: [:route, :owner])
end
......
......@@ -204,6 +204,11 @@ module EE
def with_web_entity_associations
super.preload(:compliance_framework_setting)
end
override :with_api_entity_associations
def with_api_entity_associations
super.preload(group: [:ip_restrictions, :saml_provider])
end
end
def has_regulated_settings?
......
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