From 4c38e0d47d9e2907664a60ecdd280a742c143e6e Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Mon, 26 Sep 2022 16:09:30 +0200 Subject: [PATCH] Bug 29440: Remove pointless call to _strip_item_fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MichaƂ Kula <148193449+mkibp@users.noreply.github.com> Signed-off-by: Martin Renvoize --- misc/migration_tools/bulkmarcimport.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index e49770449c6..8eb0a7515a1 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -561,9 +561,9 @@ RECORD: foreach my $record (@{$marc_records}) { if ($record_id) { $yamlhash->{$originalid} = $record_id if $yamlfile; eval { ($itemnumbers_ref, $errors_ref) = AddItemBatchFromMarc($record, $record_id, $biblioitemnumber, $framework); }; + my $error_adding = $@; $record_has_added_items = @{$itemnumbers_ref}; - my $error_adding = $@; # Work on a clone so that if there are real errors, we can maybe # fix them up later. my $clone_record = $record->clone(); @@ -632,7 +632,7 @@ RECORD: foreach my $record (@{$marc_records}) { if (@{$errors_ref}) { report_item_errors($record_id, $errors_ref); } - C4::Biblio::_strip_item_fields($record, $framework); + my $biblio = Koha::Biblios->find($record_id); $record = $biblio->metadata->record( { embed_items => 1 } ); -- 2.43.0