Bug 31785: (follow-up) Fix modify operation too

Test plan:
Enable SQL strict mode (koha-conf).
Modify branch, set Public to No.
Check.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d974073db)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 679f9942c7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Marcel de Rooy 2022-10-14 09:07:14 +00:00 committed by Arthur Suzuki
parent 1af547fcfb
commit 92b0dc2cdb
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ if ( $op eq 'add_form' ) {
if ($is_a_modif) {
my $library = Koha::Libraries->find($branchcode);
for my $field (@fields) {
if ( $field eq 'pickup_location' ) {
if( $field =~ /^(pickup_location|public)$/ ) {
# Don't fallback to undef/NULL, default is 1 in DB
$library->$field( scalar $input->param($field) );
} else {