Bugzilla – Attachment 105598 Details for
Bug 25638
API related tests failing on comparing floats
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25638: Fix regression
Bug-25638-Fix-regression.patch (text/plain), 1.27 KB, created by
Tomás Cohen Arazi
on 2020-06-05 18:56:30 UTC
(
hide
)
Description:
Bug 25638: Fix regression
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2020-06-05 18:56:30 UTC
Size:
1.27 KB
patch
obsolete
>From 1ece35e641e2d7f0e254c5c67b58c08f2d4f519e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 5 Jun 2020 16:09:46 +0200 >Subject: [PATCH] Bug 25638: Fix regression > >Now that float/decimal columns are not treated similar to integer ones, >the default value handling we had set for numeric values is not trapping >the float/decimal cases as it should. > >We love tests! > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Object.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/Object.pm b/Koha/Object.pm >index 6a741400be7..c6ae91e4efd 100644 >--- a/Koha/Object.pm >+++ b/Koha/Object.pm >@@ -127,7 +127,9 @@ sub store { > # Handle not null and default values for integers and dates > foreach my $col ( keys %{$columns_info} ) { > # Integers >- if ( _numeric_column_type( $columns_info->{$col}->{data_type} ) ) { >+ if ( _numeric_column_type( $columns_info->{$col}->{data_type} ) >+ or _decimal_column_type( $columns_info->{$col}->{data_type} ) >+ ) { > # Has been passed but not a number, usually an empty string > my $value = $self->_result()->get_column($col); > if ( defined $value and not looks_like_number( $value ) ) { >-- >2.27.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25638
:
105484
|
105485
|
105582
|
105583
|
105590
|
105595
|
105596
|
105597
| 105598 |
105599
|
105665