Fix bug that caused deleted holdings to be visible in SRU/Z39.50 results
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Wed, 8 Jan 2014 21:21:13 +0000 (13:21 -0800)
committerBen Shum <bshum@biblio.org>
Wed, 8 Jan 2014 22:04:44 +0000 (17:04 -0500)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm

index 6468772..4d4ed93 100644 (file)
@@ -2042,7 +2042,7 @@ sub basic_record_holdings {
     $logger->debug("Searching for holdings at orgs [".join(',',@ou_ids)."], based on $ou");
 
     for my $cn (@{$tree->call_numbers}) {
-        next unless ( $cn->deleted eq 'f' || $cn->deleted == 0 );
+        next unless ( $cn->deleted eq 'f' || !$cn->deleted );
 
         my $found = 0;
         for my $c (@{$cn->copies}) {
@@ -2078,7 +2078,7 @@ sub _cp_is_visible {
     my $cp = shift;
 
     my $visible = 0;
-    if ( ($cp->deleted eq 'f' || $cp->deleted == 0) &&
+    if ( ($cp->deleted eq 'f' || !$cp->deleted) &&
          $cp->location->opac_visible eq 't' && 
          $cp->status->opac_visible eq 't' &&
          $cp->opac_visible eq 't' &&