diff --git a/lib/api/builds.rb b/lib/api/builds.rb index bb9e8f1ae6ef7a23a6e32d3f4f1b3c9fdfa8f12e..7e5114052c40875b9d805fe43ed6efd23af5141e 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -70,7 +70,7 @@ module API build = get_build!(params[:build_id]) - present_artifact!(build.artifacts_file) + present_artifacts!(build.artifacts_file) end # Download the artifacts file from ref_name and job @@ -86,7 +86,7 @@ module API builds = user_project.latest_successful_builds_for(params[:ref_name]) latest_build = builds.find_by!(name: params[:job]) - present_artifact!(latest_build.artifacts_file) + present_artifacts!(latest_build.artifacts_file) end # Get a trace of a specific build of a project @@ -198,7 +198,7 @@ module API get_build(id) || not_found! end - def present_artifact!(artifacts_file) + def present_artifacts!(artifacts_file) if !artifacts_file.file_storage? redirect_to(build.artifacts_file.url) elsif artifacts_file.exists?