Bug 21183: Fix ->get_column call context
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 16 Aug 2018 15:12:11 +0000 (12:12 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 30 Aug 2018 13:40:35 +0000 (13:40 +0000)
I am not sure to understand what's going on here.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

tools/batchMod.pl

index c6c424f..d3c8d50 100755 (executable)
@@ -267,7 +267,8 @@ if ($op eq "show"){
 
             my $existing_items = Koha::Items->search({ barcode => \@barcodelist });
             @itemnumbers = $existing_items->get_column('itemnumber');
-            my %exists = map {$_=>1} @{$existing_items->get_column('barcode')};
+            my @barcodes = $existing_items->get_column('barcode');
+            my %exists = map {$_=>1} @barcodes;
             @notfoundbarcodes = grep { !$exists{$_} } @barcodelist;
         }
     }