Bug 35141: Prevent link_bibs_to_authorities from dying on invalid metadata
When fetching the record we need to eval in case of exception To test: 1 - Apply first patch 2 - perl misc/link_bibs_to_authorities.pl 3 - Note it dies on parser error at record 369 4 - Apply this patch 5 - perl misc/link_bibs_to_authorities.pl 6 - The process completes - with warning thrown on record 369 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> (cherry picked from commit706641e747
) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commited2bb9534a
) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
a552631cd7
commit
760c48886a
1 changed files with 2 additions and 1 deletions
|
@ -201,7 +201,8 @@ sub process_bib {
|
|||
my $tagtolink = $args->{tagtolink};
|
||||
my $allowrelink = $args->{allowrelink};
|
||||
my $biblio = Koha::Biblios->find($biblionumber);
|
||||
my $record = $biblio->metadata->record;
|
||||
my $record;
|
||||
eval{ $record = $biblio->metadata->record; };
|
||||
unless ( defined $record ) {
|
||||
print
|
||||
"\nCould not retrieve bib $biblionumber from the database - record is corrupt.\n";
|
||||
|
|
Loading…
Reference in a new issue