[Koha-bugs] [Bug 21610] Koha::Object->store needs to handle incorrect values
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Oct 19 12:12:41 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21610
--- Comment #9 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
About this code:
if ( $columns_info->{$col}->{is_nullable} ) {
# If nullable, default to null
$self->$col(undef);
} else {
# If cannot be null, get the default value
# What if cannot be null and does not have a default value?
Possible?
$self->$col($columns_info->{$col}->{default_value});
TRY:
alter table borrowers add column notpossible int NOT NULL;
So yes, it is possible.
For now, I would recommend to change the last statement to:
$self->$col( $columns_info->{$col}->{default_value} // 0 );
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list