]> git.koha-community.org Git - koha.git/commit
Bug 35263: Default 'can_place_ill_in_opac' to 1
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Mon, 6 Nov 2023 09:39:52 +0000 (09:39 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Nov 2023 12:58:53 +0000 (09:58 -0300)
commitbac896bb65b97cec1311f68b35c79f56f429f189
treea6ea191829ebf1cfff8b3801f979bfcd51d7723b
parent93f75b39ac621c3cc3ecb1208e9dee89bcbe4197
Bug 35263: Default 'can_place_ill_in_opac' to 1

If ILLModule sys pref is 'off', this input param is undef. The database does not allow it to be nullable causing an error.
Check if its defined (i.e. the option was submitted) and use that, if not default to 1

Test plan, k-t-d:
1) Edit an existing patron category, visit:
/cgi-bin/koha/admin/categories.pl?op=add_form&categorycode=B
2) Click 'Save' at the bottom of the form
3) Notice a yellow box is shown with an error message
4) Apply patch. Repeat steps 1-3. Notice it now updates successfully.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
admin/categories.pl