Bug 20144: [sql_modes] Fix default value for statistics.amount

Must be an integer, not empty string
Fix for:
Data truncated for column 'value'

Found with
t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-02-05 14:41:48 -03:00
parent d03a6206da
commit 9ef4bad473
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ sub UpdateStats {
my $type = $params->{type};
my $borrowernumber = exists $params->{borrowernumber} ? $params->{borrowernumber} : '';
my $itemnumber = exists $params->{itemnumber} ? $params->{itemnumber} : '';
my $amount = exists $params->{amount} ? $params->{amount} : '';
my $amount = exists $params->{amount} ? $params->{amount} : 0;
my $other = exists $params->{other} ? $params->{other} : '';
my $itemtype = exists $params->{itemtype} ? $params->{itemtype} : '';
my $location = exists $params->{location} ? $params->{location} : undef;