From: erickson Date: Tue, 9 Jun 2009 17:08:11 +0000 (+0000) Subject: ignore expired penalties X-Git-Tag: sprint4-merge-nov22~9833 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=77b11635feaa2da0d710126df00ce8299b5819dd;p=working%2FEvergreen.git ignore expired penalties git-svn-id: svn://svn.open-ils.org/ILS/trunk@13351 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm b/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm index 2c25ac6785..596a016bdf 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm @@ -70,7 +70,14 @@ sub retrieve_penalties { my($class, $e, $user_id, $context_org, @fatal_mask) = @_; my $penalties = $e->search_actor_user_standing_penalty([ - {usr => $user_id, org_unit => $U->get_org_ancestors($context_org)}, + { + usr => $user_id, + org_unit => $U->get_org_ancestors($context_org), + '-or' => [ + {stop_date => undef}, + {stop_date => {'>' => 'now'}} + ], + }, {flesh => 1, flesh_fields => {ausp => ['standing_penalty']}} ]);