diff --git a/labels/spinelabel-print.pl b/labels/spinelabel-print.pl index 82c6d51fda..d3a33cc6e4 100755 --- a/labels/spinelabel-print.pl +++ b/labels/spinelabel-print.pl @@ -48,7 +48,7 @@ $sth = $dbh->prepare($sql); $sth->execute($barcode); $item = $sth->fetchrow_hashref; -if ( $item->{'itemnumber'} eq '' ) { +unless (defined $item) { $template->param( 'Barcode' => $barcode ); $template->param( 'BarcodeNotFound' => 1 ); }