From 09728f451b7875adaa65fec1d91553582ce4367e Mon Sep 17 00:00:00 2001 From: Victor Grousset Date: Fri, 11 May 2018 17:43:33 +0200 Subject: [PATCH] Bug 20623: (QA follow-up) avoid fetch() calls in some cases --- acqui/basketgroup.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 92a58ac..78514ba 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -194,9 +194,11 @@ sub printbasketgrouppdf{ } } - my $itemtype = Koha::ItemTypes->find( $biblioitem->itemtype ); - my $item_has_type_description = $ord->{itemtype} && $biblioitem->itemtype && $itemtype; - $ord->{itemtype} = $item_has_type_description ? $itemtype->description : undef; + my $itemtype = ( $ord->{itemtype} and $biblioitem->itemtype ) + ? Koha::ItemTypes->find( $biblioitem->itemtype ) + : undef; + $ord->{itemtype} = $itemtype ? $itemtype->description : undef; + $ord->{en} = $en ? $en : undef; $ord->{edition} = $edition ? $edition : undef; -- 2.7.4