[open-ils-commits] r18301 - branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/WWW (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Oct 12 20:30:07 EDT 2010


Author: miker
Date: 2010-10-12 20:30:06 -0400 (Tue, 12 Oct 2010)
New Revision: 18301

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

Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm	2010-10-13 00:29:38 UTC (rev 18300)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm	2010-10-13 00:30:06 UTC (rev 18301)
@@ -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 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);



More information about the open-ils-commits mailing list