From 13f81933dad80105edb7e19e28aa402b1275b039 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 13 Oct 2010 00:27:46 +0000 Subject: [PATCH] deduplicate bibs going into the merge queue git-svn-id: svn://svn.open-ils.org/ILS/trunk@18298 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.11.0