[open-ils-commits] r18298 - trunk/Open-ILS/src/perlmods/OpenILS/WWW (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Oct 12 20:27:48 EDT 2010


Author: miker
Date: 2010-10-12 20:27:46 -0400 (Tue, 12 Oct 2010)
New Revision: 18298

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm
Log:
deduplicate bibs going into the merge queue

Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm	2010-10-13 00:25:59 UTC (rev 18297)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm	2010-10-13 00:27:46 UTC (rev 18298)
@@ -157,9 +157,12 @@
 
     $e->request('open-ils.cstore.direct.container.biblio_record_entry_bucket_item.create', $item )->gather(1);
 
+    my %seen;
     for my $r (@records) {
+        next unless ($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);



More information about the open-ils-commits mailing list