Bug 19489: (QA follow-up) Cache checkout object in variable

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Josef Moravec 2019-02-25 21:32:39 +00:00 committed by Nick Clemens
parent ac3223342e
commit 94f5a270ed

View file

@ -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