[open-ils-commits] r13351 - trunk/Open-ILS/src/perlmods/OpenILS/Utils (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jun 9 13:08:14 EDT 2009


Author: erickson
Date: 2009-06-09 13:08:11 -0400 (Tue, 09 Jun 2009)
New Revision: 13351

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm
Log:
ignore expired penalties

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm	2009-06-09 16:41:33 UTC (rev 13350)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm	2009-06-09 17:08:11 UTC (rev 13351)
@@ -70,7 +70,14 @@
     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']}}
     ]);
 



More information about the open-ils-commits mailing list