From 5a7af9990e538642ba9f9bc5c1fbd7720404faf5 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 29 Oct 2009 03:13:46 +0000 Subject: [PATCH] reverting previous change and correcting the use of target_weight -- I had not completed the logic git-svn-id: svn://svn.open-ils.org/ILS/trunk@14665 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Storage/Publisher/action.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index 4700a5c23b..d6b370795d 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -819,7 +819,7 @@ sub new_hold_copy_targeter { local $OpenILS::Application::Storage::WRITE = 1; - $self->{target_weight} = 0; + $self->{target_weight} = {}; my $holds; @@ -1512,12 +1512,12 @@ sub create_prox_list { next unless (defined($prox)); # Fetch the weighting value for hold targeting, defaulting to 1 - $self->{target_weight} ||= $actor->request( + $self->{target_weight}{$lib} ||= $actor->request( 'open-ils.actor.ou_setting.ancestor_default' => $lib => 'circ.holds.org_unit_target_weight' )->gather(1) || 1; $prox_list[$prox] = [] unless defined($prox_list[$prox]); - for my $w ( 1 .. $self->{target_weight} ) { + for my $w ( 1 .. $self->{target_weight}{$lib} ) { push @{$prox_list[$prox]}, $cp; } } -- 2.11.0