JBAS-2202 Update items update api fix
authorBill Erickson <berickxx@gmail.com>
Mon, 15 Apr 2019 18:38:14 +0000 (18:38 +0000)
committerBill Erickson <berickxx@gmail.com>
Mon, 15 Apr 2019 18:38:16 +0000 (18:38 +0000)
Fix an inconsistency between how the KCLS update-items interface calls
the volume save API in some cases with un-fleshed copies.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm

index f36e753..f7769ee 100644 (file)
@@ -1174,7 +1174,7 @@ sub fleshed_volume_update {
         $vol->editor($reqr->id);
         $vol->edit_date('now');
 
-        my $copies = $vol->copies;
+        my $copies = $vol->copies || [];
         $vol->clear_copies;
 
         $vol->editor($editor->requestor->id);