oops, referencing wrong object
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 20 Nov 2008 17:49:01 +0000 (17:49 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 20 Nov 2008 17:49:01 +0000 (17:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11285 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index bafc337..98ec62f 100644 (file)
@@ -109,13 +109,17 @@ sub get_group_penalty_thresholds {
 # into the fatal_penalties set.  Others will be sorted into the info_penalties set
 sub retrieve_penalties {
     my($class, $e, $user_id, @fatal_mask) = @_;
-    my $penalties = $e->search_actor_user_standing_penalty({usr => $user_id});
+    my $penalties = $e->search_actor_user_standing_penalty([
+        {usr => $user_id},
+        {flesh => 1, flesh_fields => {ausp => ['standing_penalty']}}
+    ]);
+
     my(@info, @fatal);
     for my $p (@$penalties) {
         my $pushed = 0;
-        if($p->block_list) {
+        if($p->standing_penalty->block_list) {
             for my $m (@fatal_mask) {
-                if($p->block_list =~ /$m/) {
+                if($p->standing_penalty->block_list =~ /$m/) {
                     push(@fatal, $p->name);
                     $pushed = 1;
                 }