From c62cf435e217fac89ef9f4931dfa38907aeb4486 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 28 Feb 2023 16:40:00 +0100 Subject: [PATCH] Bug 32894: Koha::Biblio->biblioitem Can we do better here? Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens (cherry picked from commit 994132a60a2e4a12eb88cc8b9d1a89f28450a7bf) Signed-off-by: Martin Renvoize (cherry picked from commit e91d18fcdde2d7c69ad9f2a8453dd5cdc736e6b4) Signed-off-by: Matt Blenkinsop --- Koha/Biblio.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index ec1354b291..85a72400be 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -564,10 +564,7 @@ Returns the related Koha::Biblioitem object for this Biblio object sub biblioitem { my ($self) = @_; - - $self->{_biblioitem} ||= Koha::Biblioitems->find( { biblionumber => $self->biblionumber() } ); - - return $self->{_biblioitem}; + return Koha::Biblioitems->find( { biblionumber => $self->biblionumber } ); } =head3 suggestions -- 2.39.5