redirect to printer REST only if barcode was found
[koha.git] / labels / spinelabel-print.pl
index da1cd21..1baa7c1 100755 (executable)
@@ -68,7 +68,7 @@ if ( my $station = $query->param('station') ) {
        });
        $insert->execute( $item->{barcode}, $item->{biblioitemnumber}, $station );
 
-} else {
+} elsif ( $item ) {
 
        my $print_data = join(' ',
                $item->{barcode},