From d878ca18f2a30df0737e21bdce4336c0d5fbe584 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 8 Dec 2009 21:40:33 +0000 Subject: [PATCH] search returns an array-ref, doh git-svn-id: svn://svn.open-ils.org/ILS/trunk@15110 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index fea40d1133..fa84d32c3e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -1612,7 +1612,9 @@ sub booking_adjusted_due_date { return unless $copy and $circ->due_date; } - if (my $booking_item = $self->editor->search_booking_resource( { barcode => $copy->barcode } )) { + my $booking_items = $self->editor->search_booking_resource( { barcode => $copy->barcode } ); + if (@$booking_items) { + my $booking_item = $booking_items->[0]; my $resource_type = $self->editor->retrieve_booking_resource_type( $booking_item->type ); my $stop_circ_setting = $U->ou_ancestor_setting_value( $self->circ_lib, 'circ.booking_reservation.stop_circ', $self->editor ); -- 2.11.0