From e3efb5f245b4c0d362abcd4d463bdc95cfaa45d2 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 6 Aug 2010 21:04:19 +0000 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/OpenILS/SIP/Transaction/Checkin.pm | 7 +++++++ 1 file changed, 7 insertions(+) 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( -- 2.11.0