Remove unnecessary check from environments service
This commit is contained in:
parent
3cf516cd20
commit
5d5b80a608
1 changed files with 0 additions and 5 deletions
|
@ -6,7 +6,6 @@ module Ci
|
|||
@ref = branch_name
|
||||
|
||||
return unless has_ref?
|
||||
return unless has_environments?
|
||||
|
||||
environments.each do |environment|
|
||||
next unless environment.stoppable?
|
||||
|
@ -22,10 +21,6 @@ module Ci
|
|||
@ref.present?
|
||||
end
|
||||
|
||||
def has_environments?
|
||||
environments.any?
|
||||
end
|
||||
|
||||
def environments
|
||||
@environments ||= project
|
||||
.environments_recently_updated_on_branch(@ref)
|
||||
|
|
Loading…
Reference in a new issue