diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-22 00:20:32 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-22 00:28:36 +0100 |
commit | f898e52a00741c620733853bb834d89695ce50ec (patch) | |
tree | 5284f66a89b896d4e371c0db67032dc2fa29fe97 /app/helpers/merge_requests_helper.rb | |
parent | 0d05400bdee182de0564e4b0ac85f9365aa76adb (diff) | |
download | gitlab-ce-f898e52a00741c620733853bb834d89695ce50ec.tar.gz |
ci_build_details_path should return nil if builds_page result is nil
This is required since we parse URI later and remove the credentials
Diffstat (limited to 'app/helpers/merge_requests_helper.rb')
-rw-r--r-- | app/helpers/merge_requests_helper.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index 9a9eaa05c6d..1dd07a2a220 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -28,6 +28,8 @@ module MergeRequestsHelper def ci_build_details_path(merge_request) build_url = merge_request.source_project.ci_service.build_page(merge_request.last_commit.sha, merge_request.source_branch) + return nil unless build_url + parsed_url = URI.parse(build_url) unless parsed_url.userinfo.blank? |