From: berick Date: Thu, 5 May 2011 14:01:22 +0000 (-0400) Subject: record import error handling improvements X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=130a5dcf1f0c8bdc79dc617873e20033dc433311;p=evergreen%2Fpines.git record import error handling improvements --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm index 759a624d14..3755ad22a0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm @@ -752,6 +752,8 @@ sub import_record_list_impl { $report_args{progress}++; $report_args{e} = $e; + $report_args{import_error} = undef; + $report_args{evt} = undef; my $rec = $e->$retrieve_func([ $rec_id, @@ -912,15 +914,14 @@ sub import_record_list_impl { } if($U->event_code($record)) { - my $import_error = 'import.duplicate.tcn' if $record->{textcode} eq 'TCN_EXISTS'; - finish_rec_import_attempt(%report_args, import_error => $import_error, evt => $record); + $report_args{import_error} = 'import.duplicate.tcn' if $record->{textcode} eq 'TCN_EXISTS'; + $report_args{evt} = $record; } else { $logger->info("vl: successfully imported new $type record"); $rec->imported_as($record->id); $rec->import_time('now'); - $imported = 1 if $e->$update_func($rec); } }