@@ -, +, @@ Delete this authority record via tools/batch_delete_records.pl. Check if the linked biblio records are cleaned up. if batch_delete_records shows you the error message. --- C4/AuthoritiesMarc.pm | 2 +- C4/ImportBatch.pm | 2 +- tools/batch_delete_records.pl | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) --- a/C4/AuthoritiesMarc.pm +++ a/C4/AuthoritiesMarc.pm @@ -682,7 +682,7 @@ sub AddAuthority { =head2 DelAuthority - $authid = DelAuthority( $authid ) + DelAuthority( $authid ) Deletes $authid and calls merge to cleanup in linked biblio records --- a/C4/ImportBatch.pm +++ a/C4/ImportBatch.pm @@ -852,7 +852,7 @@ sub BatchRevertRecords { $num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'}); $error = DelBiblio($rowref->{'matched_biblionumber'}); } else { - my $deletedauthid = DelAuthority($rowref->{'matched_authid'}); + DelAuthority( $rowref->{'matched_authid'} ); } if (defined $error) { $num_errors++; --- a/tools/batch_delete_records.pl +++ a/tools/batch_delete_records.pl @@ -198,8 +198,8 @@ if ( $op eq 'form' ) { } else { # Authorities my $authid = $record_id; - my $r = eval { C4::AuthoritiesMarc::DelAuthority( $authid ) }; - if ( $r eq '0E0' or $@ ) { + eval { C4::AuthoritiesMarc::DelAuthority( $authid ) }; + if ( $@ ) { push @messages, { type => 'error', code => 'authority_not_deleted', --