Use actual_head_pipeline to enforce presence

This commit is contained in:
Fabio Pitino 2019-06-25 14:07:34 +01:00
parent a26916d18c
commit e236fbdb25
1 changed files with 2 additions and 2 deletions

View File

@ -1030,9 +1030,9 @@ class MergeRequest < ApplicationRecord
def mergeable_ci_state?
return true unless project.only_allow_merge_if_pipeline_succeeds?
return false unless head_pipeline
return false unless actual_head_pipeline
actual_head_pipeline&.success? || actual_head_pipeline&.skipped?
actual_head_pipeline.success? || actual_head_pipeline.skipped?
end
def environments_for(current_user)