diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2016-11-28 14:03:53 +0300 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2016-11-28 14:03:59 +0300 |
commit | d9a2093e7e6b0d532131b18dc57c240f5b4a7c55 (patch) | |
tree | e46530a20f239b809b7233c4e5e49d45f45ed2f3 /app/controllers/projects | |
parent | 6ea0b8d56322108788727a2f4ad27843013d43f1 (diff) |
Prevent error when submitting a merge request and pipeline is not defined
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index e24a670631f..a2225cc8343 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -564,7 +564,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController def define_pipelines_vars @pipelines = @merge_request.all_pipelines @pipeline = @merge_request.pipeline - @statuses = @pipeline.statuses.relevant if @pipeline.present? + @statuses_count = @pipeline.present? ? @pipeline.statuses.relevant.count : 0 end def define_new_vars |