Skip to content

Remove a second sql query for already loaded project in search#show

Dmitry Gruzd requested to merge remove-duplicate-sql-query into master

What does this MR do?

For each search in SearchController#show in a project scope we load project twice because ProjectSearchResults expects project_id instead of Project itself. This MR fixes it by passing already loaded Project into ProjectSearchResults.new

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Dmitry Gruzd

Merge request reports