Bug 13531 - bulkmarcimport bombs if no match is found Changed the die statment to...
authorThomas <tomsStudy@gmail.com>
Tue, 13 Jan 2015 03:28:41 +0000 (03:28 +0000)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 31 Mar 2015 13:56:08 +0000 (10:56 -0300)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
misc/migration_tools/bulkmarcimport.pl

index 9fd4148..0b0b27e 100755 (executable)
@@ -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] );