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/models/merge_request.rb | |
parent | 6ea0b8d56322108788727a2f4ad27843013d43f1 (diff) |
Prevent error when submitting a merge request and pipeline is not defined
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 69c6aa700d6..38d8c15e6b0 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -781,7 +781,7 @@ class MergeRequest < ActiveRecord::Base end def all_pipelines - return unless source_project + return Ci::Pipeline.none unless source_project @all_pipelines ||= source_project.pipelines .where(sha: all_commits_sha, ref: source_branch) |