From 1af547fcfb9cc8c85fcabddd006fb3d8b992ff77 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 14 Oct 2022 07:42:26 +0000 Subject: [PATCH] Bug 31785: Fix for adding non-public library The code in admin/branches.pl changed a 0 to undef which is not desirable for booleans. A similar fix was already present for pickup_location. This may need a bit more thought (somewhere else!). Test plan: Add a new branch with pickup location No, public No. Check. Signed-off-by: Marcel de Rooy Signed-off-by: Lucas Gass Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 9c4a557c970705cad8f209f05b1f615940fde0ca) Signed-off-by: Lucas Gass (cherry picked from commit 83f20319c35c36802fc8ea60632a4a1a2e49d9b5) 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 88ff021c8c..7583406902 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -132,7 +132,7 @@ if ( $op eq 'add_form' ) { branchcode => $branchcode, ( map { - $_ eq 'pickup_location' # Don't fallback to undef/NULL, default is 1 in DB + /^(pickup_location|public)$/ # Don't fallback to undef for those fields ? ( $_ => scalar $input->param($_) ) : ( $_ => scalar $input->param($_) || undef ) } @fields -- 2.39.5