Commit 5d5b80a6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Remove unnecessary check from environments service

parent 3cf516cd
......@@ -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)
......
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