From 51c6f3f2658f4ee69a185c069041f996cf886608 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 Signed-off-by: Kyle M Hall --- 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 e5b8d6cf02..50805e34c1 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.17.2 (Apple Git-113)