]> git.koha-community.org Git - koha.git/commit
Bug 17069: Koha::Patron::Category->store must default checkprevcheckout to 'inherit'
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 8 Aug 2016 09:48:36 +0000 (10:48 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 10 Aug 2016 13:12:34 +0000 (13:12 +0000)
commit26f20d64cb6336b4911f91befa736539946a0a0c
tree644d0c09e2a6bd46734144dea6795d9c3cbff701
parent5b4259be9c237c7773f6af9f6c83894718be603d
Bug 17069: Koha::Patron::Category->store must default checkprevcheckout to 'inherit'

Creating a new patron category raises an error "An error occurred when updating
this patron category. Perhaps it already exists."
DBIx::Class does not default to the value defined at the DB devel if the
key checkprevcheckout has been passed to the constructor.
We may need to provide a global fix for this kind of issue: if a column
is defined as "not null" but has a default value, the constructor
(Koha::Object->new) should not pass it to the DBIx::Class constructor
(even if assuming that null means default is a terrible mysqlism).

Test plan:
Create a new patron category.

Works as expected.
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Patron/Category.pm
t/db_dependent/Koha/Patron/Categories.t