@@ -, +, @@ $ kshell k$ prove t/db_dependent/Koha/Libraries.t --- Koha/Library.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/Koha/Library.pm +++ a/Koha/Library.pm @@ -244,8 +244,8 @@ sub validate_hold_sibling { return 1 if $params->{branchcode} eq $self->id; my $branchcode = $params->{branchcode}; - my @hold_libraries = $self->get_hold_libraries; - return grep {$_->branchcode eq $branchcode} @hold_libraries; + return $self->get_hold_libraries->search( { branchcode => $branchcode } ) + ->count > 0; } =head2 Internal methods --