From ca6c829a7b364dfbc1ea3e5430f62f940b1892e2 Mon Sep 17 00:00:00 2001 From: erickson Date: Sat, 3 Apr 2010 20:46:54 +0000 Subject: [PATCH] de-dupe li ids in picklist li fetcher. if an LI has multiple attrs for the sort field, the join collects 1 row per attr, resulting in duplicate attrs git-svn-id: svn://svn.open-ils.org/ILS/trunk@16118 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm index 957b2dbdf..d9b6c8303 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm @@ -340,7 +340,9 @@ sub retrieve_pl_lineitem { my $entries = $e->json_query($PL_ENTRY_JSON_QUERY); my @ids; - push(@ids, $_->{id}) for @$entries; + for my $entry (@$entries) { + push(@ids, $entry->{id}) unless grep { $_ eq $entry->{id} } @ids; + } for my $id (@ids) { if($$options{idlist}) { -- 2.11.0