Bug 23242: Fix insert of Z3950 servers with strict SQL modes
commit164893acfe89fbf1156ad8a93bee28771ba370d8
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sun, 4 Aug 2019 17:48:07 +0000 (4 12:48 -0500)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 2 Sep 2019 14:40:03 +0000 (2 16:40 +0200)
tree843bf38d9e5d5102c739c53362917d9e57585e45
parentf14d94e565c81f8afa25fea7e1a032f33c93ad82
Bug 23242: Fix insert of Z3950 servers with strict SQL modes

If strict SQL modes are set, the insertion of a new Z3950 server can
fail.

DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: ''
for column 'checked' at row 1 at
/home/vagrant/kohaclone/admin/z3950servers.pl line 82

Using Koha::Z3950Servers fixes the issue (handled from
Koha::Object->store)

Test plan:
- Turn the strict SQL modes on (config strict_sql_modes)
- Create a new Z3950 server filling only the mandatory fields.
=> Without this patch you will get the failure, with this patch applied
the server will be inserted sucessfully
- Delete it
=> No regression should be found
- Search for servers
=> No regression should be found (the search is a start-with, LIKE "$pattern%")

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a9c730244768ea355004e821d5be35dc2e617840)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
admin/z3950servers.pl