sanity check around CN retrieval to prevent warnings on
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 14 Sep 2006 13:48:45 +0000 (13:48 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 14 Sep 2006 13:48:45 +0000 (13:48 +0000)
retrieving by object

git-svn-id: svn://svn.open-ils.org/ILS/trunk@6094 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm

index ab20789..c3dc887 100644 (file)
@@ -347,7 +347,11 @@ sub __copy_to_title {
        my( $e, $copy ) = @_;
        #syslog('LOG_DEBUG', "OILS: copy_to_title(%s)", $copy->id);
        return $copy->dummy_title if $copy->call_number == -1;  
-       my $vol = $e->retrieve_asset_call_number($copy->call_number);
+
+       my $vol = (ref $copy->call_number) ?
+               $copy->call_number :
+               $e->retrieve_asset_call_number($copy->call_number);
+
        return __volume_to_title($e, $vol);
 }