Bug 24860: (QA follow-up): Don't assume item group is set for all items

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Kyle Hall 2022-10-31 07:20:18 -04:00 committed by Tomas Cohen Arazi
parent 6be604c4a6
commit 346b3374e1
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 1 additions and 1 deletions

View File

@ -285,7 +285,7 @@ foreach my $bibnum ( @biblionumbers ){
}
if ( $res_info->item_group ) {
$hold_info->{barcodes} = [ uniq map { defined $_->barcode && $_->item_group->id == $res_info->item_group_id ? $_->barcode : () } @$items ];
$hold_info->{barcodes} = [ uniq map { defined $_->barcode && $_->item_group && ( $_->item_group->id == $res_info->item_group_id ) ? $_->barcode : () } @$items ];
}
# items available