* hydra: reinstate proper error for non existing build, Hydra/9

This commit is contained in:
Rob Vermaas 2010-03-05 13:03:41 +00:00
parent 5be843667a
commit b75de713e5

View file

@ -15,15 +15,15 @@ sub build : Chained('/') PathPart CaptureArgs(1) {
$c->stash->{id} = $id;
$c->stash->{build} = getBuild($c, $id);
notFound($c, "Build with ID $id doesn't exist.")
if !defined $c->stash->{build};
$c->stash->{prevBuild} = getPreviousBuild($c, $c->stash->{build});
$c->stash->{prevSuccessfulBuild} = getPreviousSuccessfulBuild($c, $c->stash->{build});
$c->stash->{mappers} = [$c->model('DB::UriRevMapper')->all];
notFound($c, "Build with ID $id doesn't exist.")
if !defined $c->stash->{build};
$c->stash->{project} = $c->stash->{build}->project;
}