sanity check
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 25 Aug 2006 20:36:31 +0000 (20:36 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 25 Aug 2006 20:36:31 +0000 (20:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5687 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index b1d424b..81d7028 100644 (file)
@@ -77,9 +77,12 @@ sub build_runner {
        $runner->insert( "$evt.copy",                   $ctx->{copy}, 1);
        $runner->insert( "$evt.volume",         $ctx->{volume}, 1);
        $runner->insert( "$evt.title",          $ctx->{title}, 1);
-       $runner->insert( "$evt.requestor",      $ctx->{requestor}, 1);
-       $runner->insert( "$evt.location",       
-               $editor->retrieve_actor_org_unit($ctx->{requestor}->ws_ou), 1);
+
+       if( $ctx->{requestor} ) {
+               $runner->insert( "$evt.requestor",      $ctx->{requestor}, 1);
+               $runner->insert( "$evt.location",       
+                       $editor->retrieve_actor_org_unit($ctx->{requestor}->ws_ou), 1);
+       }
 
        $runner->insert( "$evt.patronItemsOut", $ctx->{patronItemsOut}, 1 );
        $runner->insert( "$evt.patronOverdueCount", $ctx->{patronOverdue}, 1 );