From: Bill Erickson Date: Thu, 16 Jan 2014 15:30:56 +0000 (-0500) Subject: ACQ avoid dupe lineitem asset processing / patron reqs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2d22996853e836c6b614a1c43790fa92e1454c01;p=working%2FEvergreen.git ACQ avoid dupe lineitem asset processing / patron reqs Repair a thinko in create_lineitem_list_assets which resulted in each lineitem havings its asset creation routine run twice. In addition to making the code more efficient, this will avoid the unintended creation of duplicate holds from ACQ user requests. Note that copies and call numbers were not duplicated, because the code was already preventing that. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm index eac934baca..7bd21c4629 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -423,7 +423,10 @@ sub import_li_bibs_via_vandelay { ); # add the already-imported records to the response list - push(@{$res->{li_ids}}, grep { $_ != @$needs_importing } @$li_ids); + for my $id (@$li_ids) { + push(@{$res->{li_ids}}, $id) + unless grep { $_ == $id } @$needs_importing; + } $logger->info("acq-vl: processing recs via Vandelay with args: ".Dumper($vandelay));