diff options
author | Alex Sanford <alex.sanford1@gmail.com> | 2016-11-19 11:28:56 -0400 |
---|---|---|
committer | Alex Sanford <alex.sanford1@gmail.com> | 2016-11-19 11:37:12 -0400 |
commit | 16a8d6442928b6909e4421430f4bfc9b725c1bc9 (patch) | |
tree | 5c637e3afbf79baab6499178e3dc4d49b9f1e702 /app/services | |
parent | cf0283c8935986c7182e3b22610eba4f0fb485a1 (diff) | |
download | gitlab-ce-16a8d6442928b6909e4421430f4bfc9b725c1bc9.tar.gz |
Fix regression in Merge request form
Merge request !7163 caused an error message to appear on the Merge
Request form when it was first loaded by the user. This commit fixes
that regression bug.
Diffstat (limited to 'app/services')
-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 |