Fix display of builds that don't have an eval

Like http://hydra.nixos.org/build/22872.
This commit is contained in:
Eelco Dolstra 2016-02-12 16:27:25 +01:00
parent 92d8b59361
commit 5c5bb3762c

View file

@ -101,10 +101,12 @@ sub build_GET {
entity => $build entity => $build
); );
my ($eval2) = $c->stash->{eval}->jobset->jobsetevals->search( if (defined $c->stash->{eval}) {
{ hasnewbuilds => 1, id => { '<', $c->stash->{eval}->id } }, my ($eval2) = $c->stash->{eval}->jobset->jobsetevals->search(
{ order_by => "id DESC", rows => 1 }); { hasnewbuilds => 1, id => { '<', $c->stash->{eval}->id } },
$c->stash->{otherEval} = $eval2 if defined $eval2; { order_by => "id DESC", rows => 1 });
$c->stash->{otherEval} = $eval2 if defined $eval2;
}
# If this is an aggregate build, get its constituents. # If this is an aggregate build, get its constituents.
$c->stash->{constituents} = [$build->constituents_->search({}, {order_by => ["job"]})]; $c->stash->{constituents} = [$build->constituents_->search({}, {order_by => ["job"]})];