forked from lix-project/hydra
* Handle the case where there is no cached build step that produced
outpath. This can happen if the build was performed outside of Hydra.
This commit is contained in:
parent
3b504b2370
commit
a2a041303f
|
@ -41,7 +41,7 @@ sub view_build : Chained('build') PathPart('') Args(0) {
|
|||
|
||||
if (defined $build->resultInfo && $build->resultInfo->iscachedbuild) {
|
||||
(my $cachedBuildStep) = $c->model('DB::BuildSteps')->search({ outpath => $build->outpath }, {}) ;
|
||||
$c->stash->{cachedBuild} = $cachedBuildStep->build;
|
||||
$c->stash->{cachedBuild} = $cachedBuildStep->build if defined $cachedBuildStep;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
<td>[% INCLUDE renderDateTime timestamp = build.timestamp %]</td>
|
||||
</tr>
|
||||
[% IF build.finished && build.resultInfo.buildstatus != 4 %]
|
||||
[% IF build.resultInfo.iscachedbuild %]
|
||||
[% IF build.resultInfo.iscachedbuild && cachedBuild %]
|
||||
<tr>
|
||||
<th>Cached build:</th>
|
||||
<td><a href="[% c.uri_for('/build' cachedBuild.id ) %]">[% cachedBuild.id %]</a></td>
|
||||
|
|
Loading…
Reference in a new issue