From 847d50f865c4a8b591163041fd987001ecda2ead Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 16 Sep 2022 15:52:13 +0000 Subject: [PATCH] Bug 31095: (follow-up) Iterate debarments in batch mod Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- tools/modborrowers.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index 8a28815fbe..46f79d70eb 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -383,7 +383,7 @@ if ( $op eq 'do' ) { if ( grep { /debarred/ } @disabled ) { eval { my $debarrments = $patron->restrictions; - foreach my $debarment (@$debarrments) { + while( my $debarment = $debarrments->next ) { DelDebarment( $debarment->borrower_debarment_id ); } }; -- 2.39.5