From: erickson Date: Wed, 8 Jul 2009 15:49:36 +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=1dd913855d0cc8cf25ef76664b273696a4951dfb;p=Evergreen.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/branches/rel_1_4_0@13530 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 29258c6012..bd9a4d4368 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm @@ -379,14 +379,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;