[open-ils-commits] r13601 - branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 15 12:15:58 EDT 2009
Author: miker
Date: 2009-07-15 12:15:55 -0400 (Wed, 15 Jul 2009)
New Revision: 13601
Modified:
branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
Log:
Merging 13599 from trunk: Protect against duplicate Located URIs at ingest time
Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm 2009-07-15 16:15:46 UTC (rev 13600)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm 2009-07-15 16:15:55 UTC (rev 13601)
@@ -175,11 +175,19 @@
}
}
+ # Check for an existing CN-URI map
+ $tmp = $cstore->request(
+ 'open-ils.cstore.direct.asset.uri_call_number_map.id_list',
+ { call_number => $u->{call_number}->id, uri => $u->{uri}->id }
+ )->gather(1);
+
+ next if ($tmp);
+
my $umap = Fieldmapper::asset::uri_call_number_map->new;
$umap->uri($u->{uri}->id);
$umap->call_number($u->{call_number}->id);
- $cstore->request( 'open-ils.cstore.direct.asset.uri_call_number_map.create' => $umap )->gather(1) if (!$tmp);
+ $cstore->request( 'open-ils.cstore.direct.asset.uri_call_number_map.create' => $umap )->gather(1);
}
# update full_rec stuff ...
More information about the open-ils-commits
mailing list