https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28567
--- Comment #13 from Jonathan Druart <[email protected]> --- (In reply to Marcel de Rooy from comment #12) > (In reply to Jonathan Druart from comment #3) > > This is (very?) bad. > > > > When a new library is created, all the non-filled (empty string) fields that > > are "text" at DB level will be set to NULL. > > BUT after they are edited, they are set to an empty string. > > Not sure if this is very bad btw. It is inconsistent, yes. > This report is doing two separate things? Separate but linked, the title of the patch is "0 vs '' vs undef". I think they should all be fixed here. > + $_ eq 'pickup_location' # Don't fallback to > undef/NULL, default is 1 in DB > + ? ( $_ => scalar $input->param($_) ) > + : ( $_ => scalar $input->param($_) || undef ) > > This kind of construction in scripts like admin/branches will make our life > not easier? That's usual per code, I don't see any problems with that. > Should this be a change done by the store sub of Library instead? No, that's controller job. > Note that if we adjust a library somewhere else too we now need to duplicate > these lines again. > And we could test it ? See above. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
