Commit 2883b290 authored by Arturo Herrero's avatar Arturo Herrero

Fix deprecation warning in ContainerRepository

DEPRECATION WARNING: Class level methods will no longer inherit scoping
from `for_group_and_its_subgroups` in Rails 6.1. To continue using the
scoped relation, pass it into the block directly. To instead access the
full set of models, as Rails 6.1 will, use
`ContainerRepository.default_scoped`. (called from block in
<class:ContainerRepository> at
gitlab/app/models/container_repository.rb:29)
parent aeef33f8
......@@ -25,8 +25,7 @@ class ContainerRepository < ApplicationRecord
.with_container_registry
.select(:id)
ContainerRepository
.joins("INNER JOIN (#{project_scope.to_sql}) projects on projects.id=container_repositories.project_id")
joins("INNER JOIN (#{project_scope.to_sql}) projects on projects.id=container_repositories.project_id")
end
scope :for_project_id, ->(project_id) { where(project_id: project_id) }
scope :search_by_name, ->(query) { fuzzy_search(query, [:name], use_minimum_char_limit: false) }
......
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