Bug 41879: (follow-up) Bail with error code when no items on target bib
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
c9e5e6c5cb
commit
670c4cc35a
|
|
@ -222,7 +222,10 @@ sub move_hold {
|
|||
$new_biblionumber = $args->{new_biblionumber};
|
||||
|
||||
# for record level holds we must check to make sure there is at least 1 item on the record that can fulfill the new hold
|
||||
my @items = Koha::Items->search( { biblionumber => $new_biblionumber } )->as_list;
|
||||
my @items = Koha::Items->search( { biblionumber => $new_biblionumber } )->as_list;
|
||||
|
||||
return { success => 0, error => 'noItemsOnBib' } unless @items;
|
||||
|
||||
my $valid_pickup_item = 0;
|
||||
foreach my $candidate_item (@items) {
|
||||
if ( $self->_pickup_valid_for_item( $candidate_item, $patron ) ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue