Bug 25638: Revert "Bug 25513: Remove unneeded integer casting in Koha::Object->TO_JSON"
This reverts commit a79cf4150e.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
0569072fc1
commit
59ae6ced7f
|
|
@ -353,6 +353,15 @@ sub TO_JSON {
|
|||
? Mojo::JSON->true
|
||||
: Mojo::JSON->false;
|
||||
}
|
||||
elsif ( _numeric_column_type( $columns_info->{$col}->{data_type} )
|
||||
and looks_like_number( $unblessed->{$col} )
|
||||
) {
|
||||
|
||||
# TODO: Remove once the solution for
|
||||
# https://rt.cpan.org/Ticket/Display.html?id=119904
|
||||
# is ported to whatever distro we support by that time
|
||||
$unblessed->{$col} += 0;
|
||||
}
|
||||
elsif ( _datetime_column_type( $columns_info->{$col}->{data_type} ) ) {
|
||||
eval {
|
||||
return unless $unblessed->{$col};
|
||||
|
|
|
|||
Loading…
Reference in New Issue