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
); );
if (defined $c->stash->{eval}) {
my ($eval2) = $c->stash->{eval}->jobset->jobsetevals->search( my ($eval2) = $c->stash->{eval}->jobset->jobsetevals->search(
{ hasnewbuilds => 1, id => { '<', $c->stash->{eval}->id } }, { hasnewbuilds => 1, id => { '<', $c->stash->{eval}->id } },
{ order_by => "id DESC", rows => 1 }); { order_by => "id DESC", rows => 1 });
$c->stash->{otherEval} = $eval2 if defined $eval2; $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"]})];