[GIT] Evergreen ILS branch rel_3_15 updated. d35da051ea0a6635a250912211e399ffc5ce543f

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, rel_3_15 has been updated via d35da051ea0a6635a250912211e399ffc5ce543f (commit) from 3d0d6839b89b6292a7bcc5b1c910093135b4ca69 (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 d35da051ea0a6635a250912211e399ffc5ce543f 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
participants (1)
-
Git User