Bug 20623: (QA follow-up) Remove one find call
Imo these somewhat weird lines ask for improvement, but I don't want to change the exact conditions here. Just removing the need to call find twice. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
3811985c3a
commit
1bc3bbfdc7
|
|
@ -194,10 +194,9 @@ sub printbasketgrouppdf{
|
|||
}
|
||||
}
|
||||
|
||||
my $item_has_type_description = ($ord->{itemtype}
|
||||
and $biblioitem->itemtype
|
||||
and Koha::ItemTypes->find( $biblioitem->itemtype ));
|
||||
$ord->{itemtype} = $item_has_type_description ? Koha::ItemTypes->find( $biblioitem->itemtype )->description : undef;
|
||||
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;
|
||||
$ord->{en} = $en ? $en : undef;
|
||||
$ord->{edition} = $edition ? $edition : undef;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue