w/ in-db circ, if patron permit fails with 'no_item', continue on if this is a noncat...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Apr 2010 14:20:56 +0000 (14:20 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Apr 2010 14:20:56 +0000 (14:20 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16201 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm

index 2141439..fa197ec 100644 (file)
@@ -998,9 +998,12 @@ sub run_patron_permit_scripts {
 
         my $results = $self->run_indb_circ_test;
         unless($self->circ_test_success) {
-            push(@allevents, OpenILS::Event->new(
-                $LEGACY_CIRC_EVENT_MAP->{$_->{fail_part}} || $_->{fail_part}
-                )) for @$results;
+            # no_item result is OK during noncat checkout
+            unless(@$results == 1 && $results->[0]->{fail_part} eq 'no_item' and $self->is_noncat) {
+                push(@allevents, OpenILS::Event->new(
+                    $LEGACY_CIRC_EVENT_MAP->{$_->{fail_part}} || $_->{fail_part}
+                    )) for @$results;
+            }
         }
 
     } else {