From: Jason Stephenson Date: Sat, 13 Sep 2014 18:49:43 +0000 (-0400) Subject: Deflesh copy->call_number in NCIP::ILS::Evergreen->delete_copy. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5049b94a6780c444427c4dd4040e1a6746cf720e;p=working%2FNCIPServer.git Deflesh copy->call_number in NCIP::ILS::Evergreen->delete_copy. To keep things simple, we deflesh the call number of the copy to be deleted, if it was fleshed earlier, which it was likely to be. Signed-off-by: Jason Stephenson --- diff --git a/lib/NCIP/ILS/Evergreen.pm b/lib/NCIP/ILS/Evergreen.pm index 0e2a174..a2f8005 100644 --- a/lib/NCIP/ILS/Evergreen.pm +++ b/lib/NCIP/ILS/Evergreen.pm @@ -1297,6 +1297,12 @@ sub delete_copy { # First, make sure the copy is not already deleted and we own it. return undef if ($U->is_true($copy->deleted()) || $copy->circ_lib() != $ou_id); + # If call_number was fleshed, deflesh it. + if (ref($copy->call_number())) { + my $cn = $copy->call_number(); + $copy->call_number($cn->id()); + } + # We need a transaction & connected session. my $xact; my $session = OpenSRF::AppSession->create('open-ils.pcrud');