[open-ils-commits] r16552 - trunk/Open-ILS/src/perlmods/OpenILS/Utils (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jun 1 17:04:45 EDT 2010
Author: senator
Date: 2010-06-01 17:04:39 -0400 (Tue, 01 Jun 2010)
New Revision: 16552
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Utils/PermitHold.pm
Log:
Make in-db hold checking consistent with circulation when it comes to
returning events with fail_part set.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/PermitHold.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/PermitHold.pm 2010-06-01 20:40:25 UTC (rev 16551)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/PermitHold.pm 2010-06-01 21:04:39 UTC (rev 16552)
@@ -232,10 +232,15 @@
return [OpenILS::Event->new('NO_POLICY_MATCHPOINT')] unless @$results;
return [] if $U->is_true($results->[0]->{success});
- my @events;
- push(@events, OpenILS::Event->new(
- $LEGACY_HOLD_EVENT_MAP->{$_->{fail_part}})) for @$results;
- return \@events;
+ return [
+ map {
+ my $event = new OpenILS::Event(
+ $LEGACY_HOLD_EVENT_MAP->{$_->{"fail_part"}} || $_->{"fail_part"}
+ );
+ $event->{"payload"} = {"fail_part" => $_->{"fail_part"}};
+ $event;
+ } @$results
+ ];
}
More information about the open-ils-commits
mailing list