diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index ecf08fa9c7..593670d5ff 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -284,7 +284,8 @@ if ( $op eq 'view' ) { my $contents = $shelf->get_contents->search( {}, { - prefetch => [ { 'biblionumber' => { 'biblioitems' => 'items' } } ], + distinct => 'biblionumber', + join => [ { 'biblionumber' => { 'biblioitems' => 'items' } } ], page => $page, rows => $rows, order_by => { "-$direction" => $order_by },