de-dupe li ids in picklist li fetcher. if an LI has multiple attrs for the sort...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 3 Apr 2010 20:46:54 +0000 (20:46 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 3 Apr 2010 20:46:54 +0000 (20:46 +0000)
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

index 957b2db..d9b6c83 100644 (file)
@@ -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}) {