project with 0 build resulted in error
This commit is contained in:
parent
8911351e7b
commit
f55e0444c9
|
@ -37,9 +37,13 @@ sub getBuildStats {
|
|||
{finished => 0, busy => 1},
|
||||
{join => 'schedulingInfo'}) || 0;
|
||||
|
||||
$c->stash->{totalBuildTime} = $builds->search({},
|
||||
my $res;
|
||||
$res = $builds->search({},
|
||||
{join => 'resultInfo', select => {sum => 'stoptime - starttime'}, as => ['sum']})
|
||||
->first->get_column('sum') || 0;
|
||||
->first ;
|
||||
|
||||
$c->stash->{totalBuildTime} = defined ($res) ? $res->get_column('sum') : 0 ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue