From e1cdb4ebfa9e00850566a01de2719ff8daa9aee0 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 13 Jan 2015 03:28:41 +0000 Subject: [PATCH] Bug 13531 - bulkmarcimport bombs if no match is found Changed the die statment to a warn allowing the import to continue. Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- misc/migration_tools/bulkmarcimport.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 9fd4148b53..0b0b27eff5 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -269,7 +269,11 @@ RECORD: while ( ) { my $server = ( $authorities ? 'authorityserver' : 'biblioserver' ); $debug && warn $query; my ( $error, $results, $totalhits ) = C4::Search::SimpleSearch( $query, 0, 3, [$server] ); - die "unable to search the database for duplicates : $error" if ( defined $error ); + # changed to warn so able to continue with one broken record + if ( defined $error ) { + warn "unable to search the database for duplicates : $error"; + next; + } $debug && warn "$query $server : $totalhits"; if ( $results && scalar(@$results) == 1 ) { my $marcrecord = C4::Search::new_record_from_zebra( $server, $results->[0] ); -- 2.39.5