From 21815fe3e92f48ab7da759f20f092fbf7eb830b2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 May 2020 15:35:33 +0200 Subject: [PATCH] Bug 25567: Fix typo categorycode vs category_code Well, this is actually the real root of the error! --- tools/modborrowers.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 6c53a23912..bb41637f9f 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -132,7 +132,7 @@ if ( $op eq 'show' ) { my $category_code = $attr_type->category_code; my ( $category_lib ) = map { - ( defined $category_code and $attr_type->categorycode eq $category_code ) ? $attr_type->description : () + ( defined $category_code and $attr_type->category_code eq $category_code ) ? $attr_type->description : () } @patron_categories; push @patron_attributes_codes, { @@ -381,7 +381,7 @@ if ( $op eq 'do' ) { $attribute->{attribute} = $attr_values[$i]; my $attr_type = Koha::Patron::Attribute::Types->find($_); # If this borrower is not in the category of this attribute, we don't want to modify this attribute - ++$i and next if $attr_type->category_code and $attr_type->category_code ne $patron->category_code; + ++$i and next if $attr_type->category_code and $attr_type->category_code ne $patron->categorycode; my $valuename = "attr" . $i . "_value"; if ( grep { $_ eq $valuename } @disabled ) { # The attribute is disabled, we remove it for this borrower ! -- 2.20.1