From 2d50eb242d65c4ef9e0df3efd772b37b8c18aec5 Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Fri, 23 Sep 2022 17:32:51 +0200 Subject: [PATCH] Bug 29440: replace usage of removed GetMarcBiblio MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Kula <148193449+mkibp@users.noreply.github.com> Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- misc/migration_tools/bulkmarcimport.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index dc2374c6a7..e49770449c 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -18,7 +18,6 @@ use C4::Biblio qw( ModBiblio ModBiblioMarc GetFrameworkCode - GetMarcBiblio BiblioAutoLink ); use C4::Koha; @@ -634,10 +633,9 @@ RECORD: foreach my $record (@{$marc_records}) { report_item_errors($record_id, $errors_ref); } C4::Biblio::_strip_item_fields($record, $framework); - if ($record_has_added_items || $matched_record_id) { - # Replace with record from GetMarcBiblio with "$embeditems = 1" - $record = GetMarcBiblio({biblionumber => $record_id, embed_items => 1}); - } + my $biblio = Koha::Biblios->find($record_id); + $record = $biblio->metadata->record( { embed_items => 1 } ); + push @search_engine_record_ids, $record_id; push @search_engine_records, $record; } -- 2.39.5