From: erickson Date: Wed, 8 Jul 2009 15:48:41 +0000 (+0000) Subject: if alerting on empty bibs and not overriding, return the alert. if overriding or... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e1c0241b98389ec3d75f013b37d7b1f2408713ec;p=evergreen%2Fbjwebb.git if alerting on empty bibs and not overriding, return the alert. if overriding or not alerting, do the delete (if keep on empty if not set) git-svn-id: svn://svn.open-ils.org/ILS/trunk@13526 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm index a150a07ab..ed5aa4a03 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm @@ -414,14 +414,14 @@ sub remove_empty_objects { $editor->update_asset_call_number($vol) or return $editor->event; } + return OpenILS::Event->new('TITLE_LAST_COPY', payload => $vol->record ) + if $aoe and not $override; + unless($koe) { # delete the bib record if the keep-on-empty setting is not set my $evt = OpenILS::Application::Cat::BibCommon->delete_rec($editor, $vol->record); return $evt if $evt; } - - # return the empty alert if the alert-on-empty setting is set - return OpenILS::Event->new('TITLE_LAST_COPY', payload => $vol->record ) if $aoe; } return undef;