Bug 19484: Add test before using object itemtype

Patch applies and functions as described. I agree with you that importing NULL itemtypes is possible Marcel. A higher importance level makes sense.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Marcel de Rooy 2017-10-18 16:00:34 +02:00 committed by Jonathan Druart
parent 30a0d4f6c9
commit bb1c184b84
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ while ( my $c = $sth->fetchrow_hashref() ) {
author => $c->{author},
barcode => $c->{barcode},
itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype},
itemtype_description => $itemtype->translated_description,
itemtype_description => $itemtype ? $itemtype->translated_description : q{},
location => $location,
homebranch => $c->{homebranch},
itemnotes => $c->{itemnotes},