From: erickson Date: Thu, 1 Nov 2007 16:20:05 +0000 (+0000) Subject: clearing current_copy and prev_check_time on previously targeted hold instead of... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=40348a700e99554ec126885868cbaf4d9780c0e5;p=Evergreen.git clearing current_copy and prev_check_time on previously targeted hold instead of running the hold targeter inline git-svn-id: svn://svn.open-ils.org/ILS/trunk@7959 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index 9bce55d7df..9b26acf78b 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -1326,10 +1326,12 @@ sub find_nearest_permitted_hold { # re-target any other holds that already target this copy for my $old_hold (@$old_holds) { next if $old_hold->id eq $best_hold->id; # don't re-target the hold we want - $logger->info("circulator: re-targeting hold ".$old_hold->id. - " after a better hold [".$best_hold->id."] was found"); - $U->storagereq( - 'open-ils.storage.action.hold_request.copy_targeter', undef, $old_hold->id ); + $logger->info("circulator: clearing current_copy and prev_check_time on hold ". + $old_hold->id." after a better hold [".$best_hold->id."] was found"); + $old_hold->clear_current_copy; + $old_hold->clear_prev_check_time; + $editor->update_action_hold_request($old_hold) + or return (undef, $editor->event); } return ($best_hold);