Attempting to create a patron card layout with mysql strict mode on gives the following error:
DBD::mysql::st execute failed: Incorrect integer value: '' for column 'layout_id' at row 1
Test plan:
- Turn on sql_strict_modes
- Create a new patron card
=> Must success with this patch applied
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
}
else { # otherwise create a new record
my @params;
+ delete $self->{layout_id}; # Could be an empty string
my $query = "INSERT INTO creator_layouts (";
foreach my $key (keys %{$self}) {
push (@params, $self->{$key});