Give latest succeeded one, don't give pending/running ones
This commit is contained in:
parent
b14d40f0b0
commit
ef833a2205
1 changed files with 3 additions and 1 deletions
|
@ -61,7 +61,9 @@ class Projects::ArtifactsController < Projects::ApplicationController
|
|||
|
||||
def build_from_ref
|
||||
if params[:ref]
|
||||
project.builds_for(params[:build_name], params[:ref]).latest.first
|
||||
builds = project.builds_for(params[:build_name], params[:ref])
|
||||
|
||||
builds.latest.success.first
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue