if alerting on empty bibs and not overriding, return the alert. if overriding or...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 8 Jul 2009 15:48:41 +0000 (15:48 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 8 Jul 2009 15:48:41 +0000 (15:48 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13526 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm

index a150a07..ed5aa4a 100644 (file)
@@ -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;