From: miker Date: Wed, 13 Oct 2010 00:27:46 +0000 (+0000) Subject: deduplicate bibs going into the merge queue X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=13f81933dad80105edb7e19e28aa402b1275b039;p=evergreen%2Ftadl.git deduplicate bibs going into the merge queue git-svn-id: svn://svn.open-ils.org/ILS/trunk@18298 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm b/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm index b48bfe8c0a..aafaf4590e 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm @@ -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 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);