From 4fe8b62f8429bde8f73d893ca34d0dec4de0f91c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 12 Apr 2018 12:31:28 -0300 Subject: [PATCH] Bug 20499: just check if GetItem returns something is enough Signed-off-by: Jonathan Druart Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 369d4a2f98..98498b81ff 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -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; -- 2.39.5