forked from lix-project/hydra
fix nrbuilds query
This commit is contained in:
parent
ab81ce689d
commit
13df3e4191
|
@ -189,7 +189,7 @@ sub nrbuilds : Chained('api') PathPart('nrbuilds') Args(0) {
|
|||
$base = 60*60 if($period eq "hour");
|
||||
$base = 24*60*60 if($period eq "day");
|
||||
|
||||
my @stats = $c->model('DB::Builds')->search($filter, {select => ["count(*)"], as => ["nr"], group_by => ["timestamp - timestamp % $base"], order_by => "timestamp - timestamp % $base DESC", rows => $nr}) ;
|
||||
my @stats = $c->model('DB::Builds')->search($filter, {select => [{ count => "*" }], as => ["nr"], group_by => ["timestamp - timestamp % $base"], order_by => "timestamp - timestamp % $base DESC", rows => $nr}) ;
|
||||
my @arr ;
|
||||
foreach my $d (@stats) {
|
||||
push @arr, int($d->get_column("nr"));
|
||||
|
|
Loading…
Reference in a new issue