From 21a7672cf778d11a7de5e2b9adbc52ec941cb569 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 4 Sep 2015 13:00:48 +0100 Subject: [PATCH] Bug 12478: Fix error on indexing a specific record % perl misc/search_tools/rebuild_elastic_search.pl -bn 42 Can't locate object method "idnumber" via package "MARC::Record" at misc/search_tools/rebuild_elastic_search.pl line 171. --- Koha/Biblio.pm | 2 +- misc/search_tools/rebuild_elastic_search.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 480b716..6c975d6 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -93,7 +93,7 @@ It will return C if the biblio doesn't exist. sub get_from_biblionumber { my ($class, $bibnum, %options) = @_; - my $marc = get_marc_biblio($bibnum, %options); + my $marc = $class->get_marc_biblio($bibnum, %options); return $class->new($marc, $bibnum); } diff --git a/misc/search_tools/rebuild_elastic_search.pl b/misc/search_tools/rebuild_elastic_search.pl index 9e15edb..804bb64 100755 --- a/misc/search_tools/rebuild_elastic_search.pl +++ b/misc/search_tools/rebuild_elastic_search.pl @@ -125,7 +125,7 @@ if ($index_biblios) { $next = sub { my $r = shift @biblionumbers; return () unless defined $r; - return ($r, Koha::Biblio->get_marc_biblio($r, item_data => 1)); + return ($r, Koha::Biblio->get_from_biblionumber($r, item_data => 1 )); }; } else { my $records = Koha::Biblio->get_all_biblios_iterator(); -- 2.1.0