Bug 25567: Prevent patron category type's categorycode to be created with ""
It must be NULL/undef, the default from the DB. The method Koha::Patron::Attribute::Type->categorycode is not covered by tests! To recreate: Create a new patron attribute type, don't select a patron's category (and not repeatable or unique) Go to the batch patron modification tool, enter a cardnumber, next. => boom! Apply the patch, edit the patron attribute, save Go to the batch patron modification tool, enter a cardnumber, next. => success! Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
bbe6b07f43
commit
7ce6f78956
|
|
@ -122,7 +122,7 @@ sub add_update_attribute_type {
|
|||
my $staff_searchable = $input->param('staff_searchable') ? 1 : 0;
|
||||
my $authorised_value_category = $input->param('authorised_value_category');
|
||||
my $display_checkout = $input->param('display_checkout') ? 1 : 0;
|
||||
my $category_code = $input->param('category_code');
|
||||
my $category_code = $input->param('category_code') || undef;
|
||||
my $class = $input->param('class');
|
||||
|
||||
my $attr_type = Koha::Patron::Attribute::Types->find($code);
|
||||
|
|
|
|||
Loading…
Reference in New Issue