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 <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 9c4a557c97
)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
eb1083beb2
commit
83f20319c3
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,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
|
||||
|
|
Loading…
Reference in a new issue