From 6d67da7eef7d812638a7e888edf7429518090048 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Mon, 25 Feb 2019 21:32:39 +0000 Subject: [PATCH] Bug 19489: (QA follow-up) Cache checkout object in variable Signed-off-by: Josef Moravec --- Koha/Account/Line.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index e5b8d6c..50805e3 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -64,9 +64,9 @@ sub checkout { my ( $self ) = @_; return unless $self->issue_id ; - my $checkout = Koha::Checkouts->find( $self->issue_id ); - $checkout = Koha::Old::Checkouts->find( $self->issue_id ) unless $checkout; - return $checkout; + $self->{_checkout} ||= Koha::Checkouts->find( $self->issue_id ); + $self->{_checkout} ||= Koha::Old::Checkouts->find( $self->issue_id ); + return $self->{_checkout}; } =head3 void -- 2.1.4