From 3f2eef3a465dd8f3545e39d17545e781de8995d6 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 13 Oct 2006 14:43:05 +0000 Subject: [PATCH] prevent re-fetch of copy and subsequent warning logs git-svn-id: svn://svn.open-ils.org/ILS/trunk@6466 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index bd2a9a1373..1a61ed7398 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -554,8 +554,11 @@ sub _hold_status { return 1 unless $hold->current_copy; return 2 unless $hold->capture_time; - my $copy = $e->retrieve_asset_copy($hold->current_copy) - or return $e->event; + my $copy = $hold->current_copy; + unless( ref $copy ) { + $copy = $e->retrieve_asset_copy($hold->current_copy) + or return $e->event; + } return 3 if $copy->status == OILS_COPY_STATUS_IN_TRANSIT; return 4 if $copy->status == OILS_COPY_STATUS_ON_HOLDS_SHELF; -- 2.11.0