[Koha-bugs] [Bug 20176] Set biblio.datecreated to NOW if not defined

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 15 09:05:00 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20176

--- Comment #4 from Julian Maurice <julian.maurice at biblibre.com> ---
/home/vagrant/kohaclone/Koha/Object.pm line 124 is in "store" subroutine, so it
is "store" that explodes, not "new", which is why I ask: why not override
"store" to set default values (like it is done in others "Koha::Object"s) ?

$ perl -MKoha::Biblio -E 'Koha::Biblio->new'
# No errors

$ perl -MKoha::Biblio -E 'Koha::Biblio->new->store'
DBD::mysql::st execute failed: Field 'datecreated' doesn't have a default value
[for Statement "INSERT INTO `biblio` () VALUES ()"] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.
DBIx::Class::Storage::DBI::_dbh_execute(): Field 'datecreated' doesn't have a
default value at /home/koha/koha/Koha/Object.pm line 124

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list