ignoring all stat cat updates if the copy is deleted
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 31 Aug 2006 19:52:06 +0000 (19:52 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 31 Aug 2006 19:52:06 +0000 (19:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5812 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 42b80d1..adcd295 100644 (file)
@@ -1148,6 +1148,8 @@ sub create_copy {
 sub update_copy_stat_entries {
        my( $editor, $copy, $delete_stats ) = @_;
 
+       return undef if $copy->isdeleted;
+
        my $evt;
        my $entries = $copy->stat_cat_entries;
 
@@ -1174,8 +1176,6 @@ sub update_copy_stat_entries {
                }
        }
 
-       return undef if $copy->isdeleted;
-
        # go through the stat cat update/create process
        for my $entry (@$entries) { 
                next unless $entry;