From 3268f15f7f5dc98e2bb33883c3fb5722413efb42 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 Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer --- Koha/Biblio.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 7badd607c1..927d7b898e 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -166,11 +166,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.39.5