From 52bb48ab4500a5bf507e0a3083710dfeeec52f4b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 13 Jan 2020 15:16:20 +0100 Subject: [PATCH] Bug 24366: Improve hashref construction Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- Koha/Biblio.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 5efc462e03..e503bad718 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -740,11 +740,7 @@ sub to_api { my $response = $self->SUPER::to_api( $args ); my $biblioitem = $self->biblioitem->to_api( $args ); - foreach my $key ( keys %{ $biblioitem } ) { - $response->{$key} = $biblioitem->{$key}; - } - - return $response; + return { %$response, %$biblioitem }; } =head3 to_api_mapping -- 2.11.0