Bug 24366: Improve hashref construction

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-01-13 15:16:20 +01:00 committed by Martin Renvoize
parent 52d3b5439d
commit 52bb48ab45
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 5 deletions

View File

@ -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