Commit c5b69823 authored by Vladimir Shushlin's avatar Vladimir Shushlin

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
parent e2ad397f
# frozen_string_literal: true
module ProtectedEnvironments
class SearchService < BaseService
class SearchService < ::ProtectedEnvironments::BaseService
# Returns unprotected environments filtered by name
# Limited to 20 per performance reasons
# rubocop: disable CodeReuse/ActiveRecord
......
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