Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-06 16:19:52 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-06 18:15:15 +0300
commit6c0fc62ef5c4fa4535174a9f187b9853f0fb90ac (patch)
tree0db34e09c24d3b98baa48e4db6ac27e0b4324871 /app/models/deployment.rb
parente533d43a8c03a9b47a7016f3fea01a00ca797778 (diff)
Take branch access into account when stopping environment
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index afad001d50f..37adfb4de73 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -85,8 +85,8 @@ class Deployment < ActiveRecord::Base
end
def stop_action
- return nil unless on_stop.present?
- return nil unless manual_actions
+ return unless on_stop.present?
+ return unless manual_actions
@stop_action ||= manual_actions.find_by(name: on_stop)
end