Fix ProtectedEnvironments::SearchService in dev
Without this fix ::BaseService get's loaded instead of proper ProtectedEnvironments::BaseService, and I gen an error: undefined method `project_container?' for ee/app/services/protected_environments/search_service.rb, line 8 ---------------------------------------------------------------- ``` ruby 3 class SearchService < BaseService 4 # Returns unprotected environments filtered by name 5 # Limited to 20 per performance reasons 6 # rubocop: disable CodeReuse/ActiveRecord 7 def execute(name) > 8 raise NotImplementedError unless project_container? 9 10 container 11 .environments 12 .where.not(name: container.protected_environments.select(:name)) 13 .where('environments.name LIKE ?', "#{name}%") ``` This only happens in dev environment
Showing
Please register or sign in to comment