
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Evergreen ILS". The branch, main has been updated via e2ecc55475b61ff62d69033566c5085f11f39512 (commit) from 985b2b4faf88b5d8b62966ce9295df4cb7cfc050 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e2ecc55475b61ff62d69033566c5085f11f39512 Author: Jason Stephenson <jason@sigio.com> Date: Thu Jul 3 10:38:59 2025 -0400 LP2115902: Fix issue deleting items with no parts When deleting an item with no parts, one may encounter the following error: Exception: OpenSRF::EX::ERROR 2025-07-03T10:09:33 OpenILS::Application::AppUtils /usr/local/share/perl/5.34.0/OpenILS/Application/AppUtils.pm:214 System ERROR: Call to open-ils.cat for method open-ils.cat.asset.copy.fleshed.batch.update.override failed with exception: Exception: OpenSRF::EX::ERROR 2025-07-03T10:09:33 OpenILS::Application::AppUtils /usr/local/share/perl/5.34.0/OpenILS/Application/AppUtils.pm:214 System ERROR: Exception: OpenSRF::DomainObject::oilsMethodException 2025-07-03T10:09:33 OpenSRF::AppRequest /usr/local/share/perl/5.34.0/OpenSRF/AppSession.pm:1171 <500> *** Call to [open-ils.cat.asset.copy.fleshed.batch.update.override] failed for session [1751551773.39748271117.109970442], thread trace [1]: Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.34.0/OpenILS/Application/Cat/AssetCommon.pm line 503. This commit resolves that issue. Testing is relatively simple, find a copy without parts and attempt to delete it with a scrip using open-ils.cat.asset.copy.fleshed.batch.update.override. Before this patch, it should fail. After this patch it should succeed. Release-Note: Resolves an issue deleting items without parts. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Dan Briem <dbriem@harrisonpl.org> Signed-off-by: Jane Sandberg <sandbergja@gmail.com> diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm index c9ed001b89..bb718e2c99 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm @@ -500,7 +500,7 @@ sub update_fleshed_copies { # Have to watch out for multiple items creating the same new part or the whole update will fail # This volume isn't necessarily the only volume with the same new part in this batch, so we have to check against the actual database. # Grab all the parts on the same record and then check the potentially new part against them all. - if (scalar @$parts) { + if (defined $parts && scalar @$parts) { my $preexisting_parts = $editor->search_biblio_monograph_part({ record => $vol->record, label => (map { $_->label } @$parts), ----------------------------------------------------------------------- Summary of changes: Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Evergreen ILS