Bug 20499: just check if GetItem returns something is enough
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Apr 2018 15:31:28 +0000 (12:31 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 Apr 2018 14:49:13 +0000 (11:49 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Circulation.pm

index 369d4a2..98498b8 100644 (file)
@@ -670,7 +670,7 @@ sub CanBookBeIssued {
 
     my $item = GetItem(undef, $barcode );
     # MANDATORY CHECKS - unless item exists, nothing else matters
-    unless ( $item->{barcode} ) {
+    unless ( $item ) {
         $issuingimpossible{UNKNOWN_BARCODE} = 1;
     }
     return ( \%issuingimpossible, \%needsconfirmation ) if %issuingimpossible;