From: erickson Date: Fri, 6 Aug 2010 21:04:19 +0000 (+0000) Subject: add some tests for copy existence in checkin routines X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e3efb5f245b4c0d362abcd4d463bdc95cfaa45d2;p=evergreen%2Fbjwebb.git add some tests for copy existence in checkin routines git-svn-id: svn://svn.open-ils.org/ILS/trunk@17127 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm b/Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm index 7b802b113..a4ee85371 100644 --- a/Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm +++ b/Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm @@ -49,12 +49,19 @@ sub new { sub resensitize { my $self = shift; + return 0 if !$self->{item}; return !$self->{item}->magnetic; } sub do_checkin { my $self = shift; my ($inst_id, $trans_date, $return_date, $current_loc, $item_props) = @_; # most unused + + unless($self->{item}) { + $self->ok(0); + return undef; + } + $inst_id ||= ''; my $resp = $U->simplereq(