Lines 541-547
RECORD: foreach my $record (@{$marc_records}) {
Link Here
|
541 |
} |
541 |
} |
542 |
} |
542 |
} |
543 |
elsif ($insert) { |
543 |
elsif ($insert) { |
544 |
eval { ($record_id, $biblioitemnumber) = AddBiblio($record, $framework) }; |
544 |
my $record_clone = $record->clone(); |
|
|
545 |
C4::Biblio::_strip_item_fields($record_clone); |
546 |
eval { ($record_id, $biblioitemnumber) = AddBiblio($record_clone, $framework) }; |
547 |
# If incoming record has bib ids set we need to transfer |
548 |
# new ids from record_clone to incoming record to avoid |
549 |
# working on wrong record (the original record) later on |
550 |
# when adding items for example |
551 |
C4::Biblio::_koha_marc_update_bib_ids($record, $framework, $record_id, $biblioitemnumber); |
545 |
if ($@) { |
552 |
if ($@) { |
546 |
warn "ERROR: Insert biblio $originalid failed: $@\n"; |
553 |
warn "ERROR: Insert biblio $originalid failed: $@\n"; |
547 |
printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile); |
554 |
printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile); |
548 |
- |
|
|