From 679f9942c79cbac84ccf72a410c8c925e5ddc1ff Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 14 Oct 2022 09:07:14 +0000 Subject: [PATCH] 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 Signed-off-by: Lucas Gass Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 0d974073db9311336ddb6bcdf82eb980953983a8) Signed-off-by: Lucas Gass --- admin/branches.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/branches.pl b/admin/branches.pl index 059ff599de..4d58460ac2 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -83,7 +83,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 { -- 2.39.5