[open-ils-commits] r12954 - branches/rel_1_4_0/Open-ILS/src/extras/import (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 21 19:51:13 EDT 2009
Author: miker
Date: 2009-04-21 19:51:12 -0400 (Tue, 21 Apr 2009)
New Revision: 12954
Modified:
branches/rel_1_4_0/Open-ILS/src/extras/import/marc2bre.pl
Log:
backporting TCN duplicate detection fix from head
Modified: branches/rel_1_4_0/Open-ILS/src/extras/import/marc2bre.pl
===================================================================
--- branches/rel_1_4_0/Open-ILS/src/extras/import/marc2bre.pl 2009-04-21 23:50:30 UTC (rev 12953)
+++ branches/rel_1_4_0/Open-ILS/src/extras/import/marc2bre.pl 2009-04-21 23:51:12 UTC (rev 12954)
@@ -361,12 +361,6 @@
}
}
- if (!$tcn_value || exists $used_tcns{$tcn_value}) {
- $tcn_source = 's';
- $tcn_number = $id;
- $tcn_value = $tcn_source.$tcn_number;
- }
-
# special case to catch possibly passed in full OCLC numbers and those derived from the 001 field
if ($tcn_value =~ /^oc(m|n)(\d+)$/o) {
$tcn_source = 'o';
@@ -374,6 +368,13 @@
$tcn_value = $tcn_source.$tcn_number;
}
+ if (!$tcn_value || exists $used_tcns{$tcn_value}) {
+ $tcn_source = 's';
+ $tcn_number = $id;
+ $tcn_value = $tcn_source.$tcn_number;
+ $warn = 1;
+ }
+
# expand $tcn_source from code letter to full name
$tcn_source = do { $tcn_source_map{$tcn_source} || 'Unknown' };
More information about the open-ils-commits
mailing list