View | Details | Raw Unified | Return to bug 25539
Collapse All | Expand All

(-)a/misc/migration_tools/bulkmarcimport.pl (-1 / +7 lines)
Lines 551-557 RECORD: foreach my $record (@{$marc_records}) { Link Here
551
                }
551
                }
552
            }
552
            }
553
            elsif ($insert) {
553
            elsif ($insert) {
554
                my $record_clone = $record->clone();
555
                C4::Biblio::_strip_item_fields($record_clone);
554
                eval { ($record_id, $biblioitemnumber) = AddBiblio($record, $framework) };
556
                eval { ($record_id, $biblioitemnumber) = AddBiblio($record, $framework) };
557
                # If incoming record has bib ids set we need to transfer
558
                # new ids from record_clone to incoming record to avoid
559
                # working on wrong record (the original record) later on
560
                # when adding items for example
561
                C4::Biblio::_koha_marc_update_bib_ids($record, $framework, $biblionumber, $biblioitemnumber);
555
                if ($@) {
562
                if ($@) {
556
                    warn "ERROR: Insert biblio $originalid failed: $@\n";
563
                    warn "ERROR: Insert biblio $originalid failed: $@\n";
557
                    printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile);
564
                    printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile);
558
- 

Return to bug 25539