diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-21 09:12:41 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-21 09:12:41 +0000 |
commit | 900999f8180e49aa1677286e3e0cfa08d47829a7 (patch) | |
tree | 102df693cc4077f8fb806f9eda382c778e25df54 /app | |
parent | 9aded5c8d43cf113b03e2d8fd04a32c4b24af24d (diff) | |
parent | 16a8d6442928b6909e4421430f4bfc9b725c1bc9 (diff) | |
download | gitlab-ce-900999f8180e49aa1677286e3e0cfa08d47829a7.tar.gz |
Merge branch '24627-fix-bad-mr-error-message' into 'master'
Fixes regression causing an error message to appear when user first enters the Merge Request form.
Closes #24627
See merge request !7599
Diffstat (limited to 'app')
-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 f415244068b..dd0d738674e 100644 --- a/app/services/merge_requests/build_service.rb +++ b/app/services/merge_requests/build_service.rb @@ -48,11 +48,11 @@ module MergeRequests end # See if source and target branches exist - unless merge_request.source_project.commit(merge_request.source_branch) + if merge_request.source_branch.present? && !merge_request.source_project.commit(merge_request.source_branch) messages << "Source branch \"#{merge_request.source_branch}\" does not exist" end - unless merge_request.target_project.commit(merge_request.target_branch) + if merge_request.target_branch.present? && !merge_request.target_project.commit(merge_request.target_branch) messages << "Target branch \"#{merge_request.target_branch}\" does not exist" end |