From a409a0054ee4f8ae4347641cbe0f82b023843a5d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 28 Oct 2024 09:53:08 -0300 Subject: [PATCH] Bug 31224: EmbedItems takes an arrayref Signed-off-by: Tomas Cohen Arazi --- Koha/Biblio.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 8794ff979e6..5dd0ba6dbea 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -165,11 +165,11 @@ sub metadata_record { if ( $params->{embed_items} ) { push @filters, 'EmbedItems'; - if ( $params->{interface} eq 'opac' ) { + if ( $params->{interface} && $params->{interface} eq 'opac' ) { $options->{items} = $self->items->filter_by_visible_in_opac( - { ( $params->{patron} ? ( patron => $params->{patron} ) : () ) } ); + { ( $params->{patron} ? ( patron => $params->{patron} ) : () ) } )->as_list; } else { - $options->{items} = $self->items; + $options->{items} = $self->items->as_list; } } -- 2.47.0