From 35d887fece0634eb92d030b959aeb991f10a0239 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 Signed-off-by: Jonathan Druart --- acqui/basketgroup.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 92a58ac2cb..78514ba2ac 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.39.5