From 5d5b80a608d8d89525e5e903ea47c6b66e13ed23 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 16 Nov 2016 12:39:06 +0100 Subject: Remove unnecessary check from environments service --- app/services/ci/stop_environments_service.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'app/services') diff --git a/app/services/ci/stop_environments_service.rb b/app/services/ci/stop_environments_service.rb index 0ffe73611c4..cf590459cb2 100644 --- a/app/services/ci/stop_environments_service.rb +++ b/app/services/ci/stop_environments_service.rb @@ -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) -- cgit v1.2.1