|
Lines 76-86
RECORD_IDS: for my $record_id ( sort { $a <=> $b } @record_ids ) {
Link Here
|
| 76 |
my $authid = $record_id; |
76 |
my $authid = $record_id; |
| 77 |
my $error = eval { |
77 |
my $error = eval { |
| 78 |
my $authority = Koha::MetadataRecord::Authority->get_from_authid($authid); |
78 |
my $authority = Koha::MetadataRecord::Authority->get_from_authid($authid); |
| 79 |
my $record = $authority->record; |
79 |
die("Invalid authid: $authid") unless $authority; |
|
|
80 |
|
| 81 |
my $record = $authority->record; |
| 80 |
ModifyRecordWithTemplate( $mmtid, $record ); |
82 |
ModifyRecordWithTemplate( $mmtid, $record ); |
| 81 |
ModAuthority( $authid, $record, $authority->authtypecode, { skip_record_index => 1 } ); |
83 |
ModAuthority( $authid, $record, $authority->authtypecode, { skip_record_index => 1 } ); |
| 82 |
}; |
84 |
}; |
| 83 |
if ( $error and $error != $authid or $@ ) { |
85 |
if ( $error && $error != $authid || $@ ) { |
| 84 |
push @messages, { |
86 |
push @messages, { |
| 85 |
type => 'error', |
87 |
type => 'error', |
| 86 |
code => 'authority_not_modified', |
88 |
code => 'authority_not_modified', |