From a30e83b80bfaaaf83507cd64fb6d56fb730cb722 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 27 Jul 2006 17:21:44 +0000 Subject: [PATCH] bailing out early on a call so it does not go to cstore if no id is there git-svn-id: svn://svn.open-ils.org/ILS/trunk@5127 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm index 254592f703..38315e2a6e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm @@ -717,12 +717,16 @@ sub fetch_copy_location_by_name { sub fetch_callnumber { my( $self, $id ) = @_; my $evt = undef; + + my $e = OpenILS::Event->new( 'ASSET_CALL_NUMBER_NOT_FOUND', id => $id ); + return( undef, $e ) unless $id; + $logger->debug("Fetching callnumber $id"); my $cn = $self->simplereq( 'open-ils.cstore', 'open-ils.cstore.direct.asset.call_number.retrieve', $id ); - $evt = OpenILS::Event->new( 'ASSET_CALL_NUMBER_NOT_FOUND', id => $id ) unless $cn; + $evt = $e unless $cn; return ( $cn, $evt ); } -- 2.11.0