prevent re-fetch of copy and subsequent warning logs
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Oct 2006 14:43:05 +0000 (14:43 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Oct 2006 14:43:05 +0000 (14:43 +0000)
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

index bd2a9a1..1a61ed7 100644 (file)
@@ -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;