From 33e934e5bede02006c7862d56d9e5ad77bbc0596 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 15 Apr 2009 14:15:58 +0000 Subject: [PATCH] move the duplicate TCN test to /after/ the final attempt at TCN fixup git-svn-id: svn://svn.open-ils.org/ILS/trunk@12874 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/import/marc2bre.pl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/extras/import/marc2bre.pl b/Open-ILS/src/extras/import/marc2bre.pl index 3f7a2021ea..e0e355652f 100755 --- a/Open-ILS/src/extras/import/marc2bre.pl +++ b/Open-ILS/src/extras/import/marc2bre.pl @@ -363,12 +363,6 @@ sub preprocess { } } - 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'; @@ -376,6 +370,14 @@ sub preprocess { $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' }; -- 2.11.0