Skip to content

Commit

Permalink
Merge pull request #2195 from omeka/set-correct-total-scalar-results
Browse files Browse the repository at this point in the history
Set correct total results for returnScalar requests
  • Loading branch information
zerocrates authored Jun 3, 2024
2 parents b08e424 + 73e07dd commit 06edce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/src/Api/Adapter/AbstractEntityAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public function search(Request $request)
}
$content = array_column($qb->getQuery()->getScalarResult(), $scalarField, 'id');
$response = new Response($content);
$response->setTotalResults(count($content));
$response->setTotalResults($countPaginator->count());
return $response;
}

Expand Down

0 comments on commit 06edce7

Please sign in to comment.