Bug 27420: Use object accessor for $attr_type->class()

We introduced a bug in the patron attribute forms with bug 5161.

Test plan
1/ Create two PA_CLASS authorized values
2/ Create two corresponding patron attribute types referencing the above
classes.
3/ Edit a patron, both attributes should appear within their own
fieldsets at the bottom of the member entry form.
4/ Set a value for the first of the two patron attributes and save
5/ Edit the patron again, note that the first attribute no longer
resides within it's own fieldset
6/ Apply the patch
7/ Edit the patron again, note that the first attribute now resides
inside it's own fieldset again
8/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 08396d4b2f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2021-01-13 11:22:53 +00:00 committed by Fridolin Somers
parent 54a9ef09bf
commit 2cb36767ad
1 changed files with 1 additions and 1 deletions

View File

@ -944,7 +944,7 @@ sub patron_attributes_form {
$i++;
undef $newentry->{value} if ($attr_type->unique_id() && $op eq 'duplicate');
$newentry->{form_id} = "patron_attr_$i";
push @{$items_by_class{$attr_type->{class}}}, $newentry;
push @{$items_by_class{$attr_type->class()}}, $newentry;
}
} else {
$i++;