This commit is contained in:
Rob Vermaas 2010-07-27 11:21:21 +00:00
parent d6131fba50
commit 06e0e80591

View file

@ -23,6 +23,8 @@ sub getBuild {
sub getPreviousBuild { sub getPreviousBuild {
my ($c, $build) = @_; my ($c, $build) = @_;
return undef if !defined $build;
(my $prevBuild) = $c->model('DB::Builds')->search( (my $prevBuild) = $c->model('DB::Builds')->search(
{ finished => 1 { finished => 1
, system => $build->system , system => $build->system
@ -37,6 +39,8 @@ sub getPreviousBuild {
sub getNextBuild { sub getNextBuild {
my ($c, $build) = @_; my ($c, $build) = @_;
return undef if !defined $build;
(my $nextBuild) = $c->model('DB::Builds')->search( (my $nextBuild) = $c->model('DB::Builds')->search(
{ finished => 1 { finished => 1
, system => $build->system , system => $build->system
@ -51,6 +55,8 @@ sub getNextBuild {
sub getPreviousSuccessfulBuild { sub getPreviousSuccessfulBuild {
my ($c, $build) = @_; my ($c, $build) = @_;
return undef if !defined $build;
(my $prevBuild) = joinWithResultInfo($c, $c->model('DB::Builds'))->search( (my $prevBuild) = joinWithResultInfo($c, $c->model('DB::Builds'))->search(
{ finished => 1 { finished => 1
, system => $build->system , system => $build->system