From 191ed9e713bc19ee46af485bd452561e304a94a5 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Wed, 18 Nov 2020 10:36:40 +0100
Subject: [PATCH] Bug 24488: Fix count distinct patron on a given hold

Signed-off-by: Michal Denra <black23@gmail.comm>
---
 circ/pendingreserves.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl
index 68e57a090b..d9a5107e74 100755
--- a/circ/pendingreserves.pl
+++ b/circ/pendingreserves.pl
@@ -256,7 +256,7 @@ foreach my $bibnum ( @biblionumbers ){
     # patrons with holds
     my $patrons_count = Koha::Holds->search(
         { biblionumber => $bibnum },
-        { select => [ { distinct => 'borrowernumber' } ] }
+        { distinct => 1, columns => qw(me.borrowernumber) }
     )->count;
     $reserves->{$bibnum}->{patrons_count} = $patrons_count;
 
-- 
2.11.0