$pen is an object in this case, not a hash
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Apr 2009 13:03:30 +0000 (13:03 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Apr 2009 13:03:30 +0000 (13:03 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12956 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm

index bb5f6f0..2c25ac6 100644 (file)
@@ -45,17 +45,17 @@ sub calculate_penalties {
         } else {
             $e->create_actor_user_standing_penalty($pen) or return $e->die_event;
 
-            my $csp_obj = $csp{$pen->{standing_penalty}} ||
-                $e->retrieve_config_standing_penalty( $pen->{standing_penalty} );
+            my $csp_obj = $csp{$pen->standing_penalty} ||
+                $e->retrieve_config_standing_penalty( $pen->standing_penalty );
 
             # cache for later
-            $csp{$pen->{standing_penalty}} = $csp_obj;
+            $csp{$pen->standing_penalty} = $csp_obj;
 
             $ses->request(
                 'open-ils.trigger.event.autocreate',
                 'penalty.' . $csp_obj->name,
                 $user,
-                $pen->{org_unit}
+                $pen->org_unit
             );
         }
     }