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