Bug 22878: Do not pass layout_id on creating a layout
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>
This commit is contained in:
parent
9f18afa7b3
commit
8d53fae949
1 changed files with 1 additions and 0 deletions
|
@ -165,6 +165,7 @@ sub save {
|
|||
}
|
||||
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});
|
||||
|
|
Loading…
Reference in a new issue