From ebdc910ebac7b596ced85dcd49aa44dbb781c119 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 8 Jul 2009 15:49:03 +0000 Subject: [PATCH] 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_6@13527 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm index a82b8465fb..b0c7383822 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm @@ -380,14 +380,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; -- 2.11.0