deduplicate bibs going into the merge queue
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Oct 2010 00:30:06 +0000 (00:30 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Oct 2010 00:30:06 +0000 (00:30 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@18301 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm

index b48bfe8..8f9f0ce 100644 (file)
@@ -157,9 +157,12 @@ sub handler {
 
     $e->request('open-ils.cstore.direct.container.biblio_record_entry_bucket_item.create', $item )->gather(1);
 
+    my %seen;
     for my $r (@records) {
+        next if ($seen{$r});
         $item->target_biblio_record_entry($r);
         $e->request('open-ils.cstore.direct.container.biblio_record_entry_bucket_item.create', $item )->gather(1);
+        $seen{$r}++;
     }
 
     $e->request('open-ils.cstore.transaction.commit')->gather(1);