From 1cf719479266e488a700cfa40fb811e7cf4174c6 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 22 May 2012 16:22:14 -0400 Subject: [PATCH] TPAC: recover the ability to override hold placement failures There is a certain class of hold failure events (e.g. HOLD_EXISTS, HOLD_ITEM_CHECKED_OUT) that can be overridden by patrons when they have the correct override permission. This change recovers that ability, which was recently removed with 99e8fc893a. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- .../src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index eaa96227e1..e349f3f96b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -905,7 +905,8 @@ sub attempt_hold_placement { $hdata->{could_override} = 1; $hdata->{age_protect} = 1; } else { - $hdata->{could_override} = $result->{place_unfillable}; + $hdata->{could_override} = $result->{place_unfillable} || + $self->test_could_override($hdata->{hold_failed_event}); } } elsif (ref $result eq 'ARRAY') { $hdata->{hold_failed_event} = $result->[0]; @@ -914,7 +915,8 @@ sub attempt_hold_placement { $hdata->{could_override} = 1; $hdata->{age_protect} = 1; } else { - $hdata->{could_override} = $result->[4]; # place_unfillable + $hdata->{could_override} = $result->[4] || # place_unfillable + $self->test_could_override($hdata->{hold_failed_event}); } } } -- 2.43.2