From 949abc20748c696cbe8a60addff5f91970e199ab Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Sat, 24 Oct 2020 01:51:55 +0000 Subject: [PATCH] Bug 25167: (QA follow-up) Don't add a new variable Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart (cherry picked from commit 7a87cc310b5836b6808c8836ee9e38b3dd725160) Signed-off-by: Lucas Gass --- tools/inventory.pl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/inventory.pl b/tools/inventory.pl index caeb0229b9..fd2423077b 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -120,10 +120,7 @@ for my $authvfield (@$statuses) { # if there's a list of not for loans types selected use it rather than # the full set. -if ($staton->{'items.notforloan'}) { - my @l = @{$staton->{'items.notforloan'}}; - @notforloans = @l if scalar @l > 0; -} +@notforloans = @{$staton->{'items.notforloan'}} if defined $staton->{'items.notforloan'} and scalar @{$staton->{'items.notforloan'}} > 0; my @class_sources = Koha::ClassSources->search({ used => 1 }); my $pref_class = C4::Context->preference("DefaultClassificationSource"); -- 2.39.5