diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-02-12 20:40:40 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-02-12 20:40:40 +0300 |
commit | c142bde51d05ad6fe2137c1b6bb0cd2485b4f1d9 (patch) | |
tree | c93e2ba8f8918b99f41994030fbc9893c7ef44f3 /app | |
parent | 0174263c9b60340e53635418da98681738cdddc3 (diff) | |
parent | 8172d5ca54f908d5ce9975dd18fb9bea0c992dbb (diff) |
Merge branch 'fix_500-commit-null' into 'master'
Don't try to mark broken MR as mergable
In case merge request is broken, we shouldn't check if the sha
is mergable, as it will be null, and there's no point, as we know
that it's not mergable.
See merge request !2783
Diffstat (limited to 'app')
-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 345b9a26d4e..1be8061e53d 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -241,7 +241,7 @@ class MergeRequest < ActiveRecord::Base return unless unchecked? can_be_merged = - project.repository.can_be_merged?(source_sha, target_branch) + !broken? && project.repository.can_be_merged?(source_sha, target_branch) if can_be_merged mark_as_mergeable |