From 06eda771df1a08cd0dbd647a6fc6cd67a0174c6f Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 8 Jun 2009 13:49:11 +0000 Subject: [PATCH] treat archived penalties as non-existent (unless explicitly retireved via pcrud) git-svn-id: svn://svn.open-ils.org/ILS/trunk@13338 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index a5e2f41ce1..b8201b1228 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -2682,6 +2682,10 @@ sub apply_penalty { # is it already applied? return 1 if $e->search_actor_user_standing_penalty( { usr => $penalty->usr, + '-or' => [ + {stop_date => undef}, + {stop_date => {'>' => 'now'}} + ], standing_penalty => $penalty->standing_penalty, org_unit => $penalty->org_unit })->[0]; @@ -2823,6 +2827,10 @@ sub new_flesh_user { $user->standing_penalties( $e->search_actor_user_standing_penalty([ { usr => $id, + '-or' => [ + {stop_date => undef}, + {stop_date => {'>' => 'now'}} + ], org_unit => $U->get_org_ancestors($e->requestor->ws_ou) }, { flesh => 1, -- 2.11.0