diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-06 10:35:36 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-06 10:35:36 -0800 |
commit | 0adc26898efa4f554cf5ec9de8d42e2958548816 (patch) | |
tree | d3c8cdf3737f93ba11a70793b77d31e6ea30422f | |
parent | a023daaaf70bd26fcece1a852a23cc73293e8f29 (diff) | |
parent | b72f22ee15967684226c596625a01b17f6d806ab (diff) | |
download | gitlab-ce-0adc26898efa4f554cf5ec9de8d42e2958548816.tar.gz |
Merge branch 'master' of github.com:gitlabhq/gitlabhq
-rw-r--r-- | app/services/merge_requests/build_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb index 1475973e543..859c3f56b2b 100644 --- a/app/services/merge_requests/build_service.rb +++ b/app/services/merge_requests/build_service.rb @@ -13,7 +13,7 @@ module MergeRequests merge_request.target_branch ||= merge_request.target_project.default_branch unless merge_request.target_branch && merge_request.source_branch - return build_failed(merge_request, "You must select source and target branches") + return build_failed(merge_request, nil) end # Generate suggested MR title based on source branch name @@ -59,7 +59,7 @@ module MergeRequests end def build_failed(merge_request, message) - merge_request.errors.add(:base, message) + merge_request.errors.add(:base, message) unless message.nil? merge_request.compare_commits = [] merge_request.can_be_created = false merge_request |