From 587c5e38f12988a28d79515b6bc47afe9c83a38d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 18 Jun 2021 12:36:00 +0200 Subject: [PATCH] Bug 28561: Remove DBIC warning in opac-shelves Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 298569d37f845aa2814214d600303aeb0f56053a) Signed-off-by: Fridolin Somers --- opac/opac-shelves.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 8b4c801059..a603b7bccb 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -274,7 +274,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 }, -- 2.39.5