From 55492d6bbc0cfe8117344327f35d7d8a48c4bdfa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 22 May 2024 09:35:55 +0200 Subject: [PATCH] Bug 36914: Remove DBIC warning in shelves.pl Same fix as Bug 28561: Remove DBIC warning in opac-shelves But for staff Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer (cherry picked from commit f388b99af044be538b62c9e850e341cad064ab95) Signed-off-by: Fridolin Somers (cherry picked from commit 509fd15d26a7c84563c73c12538aea54ee7c078e) Signed-off-by: Lucas Gass --- virtualshelves/shelves.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index a4a6e41ec7..c0fd6737f0 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -281,7 +281,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