From: erickson Date: Sat, 3 Apr 2010 20:46:54 +0000 (+0000) Subject: de-dupe li ids in picklist li fetcher. if an LI has multiple attrs for the sort... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ca6c829a7b364dfbc1ea3e5430f62f940b1892e2;p=evergreen%2Fmasslnc.git 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 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm index 957b2dbdff..d9b6c8303d 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}) {