From 92b0dc2cdbe0fbed29880c2f0ab7ca50162da727 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 (cherry picked from commit 679f9942c79cbac84ccf72a410c8c925e5ddc1ff) Signed-off-by: Arthur Suzuki --- admin/branches.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/branches.pl b/admin/branches.pl index 7583406902..55329aca96 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -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 { -- 2.39.5