TT#48198 Fix no_count behavior in API.pm

Change-Id: Ieb665a7fc82f8442e0b2da351cf92573d433c3b6
changes/10/25310/2
Irina Peshinskaya 6 years ago
parent 8fb7c65f92
commit 5219cdb244

@ -715,7 +715,7 @@ sub define_collection_infinite_pager {
$no_count //= $self->dont_count_collection_total($c);
if (! defined $c->stash->{collection_infinite_pager_stop}) {
#$item_rs->pager->entries_on_this_page leads to the count query
my $entries_on_this_page = $items_count // $item_rs->count;
my $entries_on_this_page = $items_count // scalar $item_rs->all;
$c->stash->{collection_infinite_pager_stop} = (( $entries_on_this_page < $rows_on_page ) and $no_count );
}
}

Loading…
Cancel
Save