View | Details | Raw Unified | Return to bug 29804
Collapse All | Expand All

(-)a/Koha/Hold.pm (-5 / +4 lines)
Lines 238-253 sub is_pickup_location_valid { Link Here
238
    Koha::Exceptions::MissingParameter->throw('The library_id parameter is mandatory')
238
    Koha::Exceptions::MissingParameter->throw('The library_id parameter is mandatory')
239
        unless $params->{library_id};
239
        unless $params->{library_id};
240
240
241
    my @pickup_locations;
241
    my $pickup_locations;
242
242
243
    if ( $self->itemnumber ) { # item-level
243
    if ( $self->itemnumber ) { # item-level
244
        @pickup_locations = $self->item->pickup_locations({ patron => $self->patron });
244
        $pickup_locations = $self->item->pickup_locations({ patron => $self->patron });
245
    }
245
    }
246
    else { # biblio-level
246
    else { # biblio-level
247
        @pickup_locations = $self->biblio->pickup_locations({ patron => $self->patron });
247
        $pickup_locations = $self->biblio->pickup_locations({ patron => $self->patron });
248
    }
248
    }
249
249
250
    return any { $_->branchcode eq $params->{library_id} } @pickup_locations;
250
    return any { $_->branchcode eq $params->{library_id} } $pickup_locations->as_list;
251
}
251
}
252
252
253
=head3 set_pickup_location
253
=head3 set_pickup_location
254
- 

Return to bug 29804