Bug 15496: (QA follow-up) Fix new uses of Koha::Biblio::items in list context
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
bf473396ab
commit
bfce1fea96
3 changed files with 5 additions and 5 deletions
|
@ -230,7 +230,7 @@ sub GetRecords {
|
|||
my $biblioitemnumber = $biblioitem->{'biblioitemnumber'};
|
||||
my $holds = $biblio->current_holds->unblessed;
|
||||
my $issues = GetBiblioIssues($biblionumber);
|
||||
my @items = $biblio->items;
|
||||
my @items = $biblio->items->as_list;
|
||||
|
||||
$biblioitem->{items}->{item} = [];
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ sub can_be_transferred {
|
|||
my $limittype = C4::Context->preference('BranchTransferLimitsType');
|
||||
|
||||
my $items;
|
||||
foreach my $item_of_bib ($self->items) {
|
||||
foreach my $item_of_bib ($self->items->as_list) {
|
||||
next unless $item_of_bib->holdingbranch;
|
||||
next if $from && $from->branchcode ne $item_of_bib->holdingbranch;
|
||||
return 1 if $item_of_bib->holdingbranch eq $to->branchcode;
|
||||
|
@ -207,7 +207,7 @@ sub hidden_in_opac {
|
|||
|
||||
my $rules = $params->{rules} // {};
|
||||
|
||||
return !(any { !$_->hidden_in_opac({ rules => $rules }) } $self->items);
|
||||
return !(any { !$_->hidden_in_opac({ rules => $rules }) } $self->items->as_list);
|
||||
}
|
||||
|
||||
=head3 article_request_type
|
||||
|
@ -457,7 +457,7 @@ sub has_items_waiting_or_intransit {
|
|||
return 1;
|
||||
}
|
||||
|
||||
foreach my $item ( $self->items ) {
|
||||
foreach my $item ( $self->items->as_list ) {
|
||||
return 1 if $item->get_transfer;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ subtest 'items() tests' => sub {
|
|||
is( ref($items), 'Koha::Items', 'Returns a Koha::Items resultset' );
|
||||
is( $items->count, 2, 'Two items in resultset' );
|
||||
|
||||
my @items = $biblio->items;
|
||||
my @items = $biblio->items->as_list;
|
||||
is( scalar @items, 2, 'Same result, but in list context' );
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
|
|
Loading…
Reference in a new issue