not all checkins require a patron. watch out for that
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 25 Nov 2008 14:49:59 +0000 (14:49 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 25 Nov 2008 14:49:59 +0000 (14:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11335 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 4768977..127d8d4 100644 (file)
@@ -565,7 +565,7 @@ sub mk_env {
        }
 
     return $self->bail_on_events(OpenILS::Event->new('ACTOR_USER_NOT_FOUND'))
-        unless $self->patron($patron);
+        unless $self->patron($patron) or $self->is_checkin;
 }
 
 # --------------------------------------------------------------------------
@@ -1744,7 +1744,9 @@ sub do_checkin {
             unless @{$self->events};
     }
 
-    OpenILS::Utils::Penalty->calculate_penalties($self->editor, $self->patron->id, $self->circ_lib);
+    OpenILS::Utils::Penalty->calculate_penalties(
+        $self->editor, $self->patron->id, $self->circ_lib) if $self->patron;
+
     $self->checkin_flesh_events;
     return;
 }