Bug 21083: Remove all attributes

not only the first one

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-04-08 09:28:40 +02:00 committed by Tomas Cohen Arazi
parent 40a37ecccd
commit 88be91a786
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -409,7 +409,7 @@ if ( $op eq 'do' ) {
if ( $attributes->{$code}->{disabled} ) { if ( $attributes->{$code}->{disabled} ) {
# The attribute is disabled, we remove it for this borrower ! # The attribute is disabled, we remove it for this borrower !
eval { eval {
$patron->get_extended_attribute($code)->delete; $patron->extended_attributes->search({'me.code' => $code})->filter_by_branch_limitations->delete;
}; };
push @errors, { error => $@ } if $@; push @errors, { error => $@ } if $@;
} else { } else {