Respect a setting of depth=0. In particular, this fixes holdings requests for branch...
authordbwells <dbwells@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Mar 2011 19:46:13 +0000 (19:46 +0000)
committerdbwells <dbwells@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Mar 2011 19:46:13 +0000 (19:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19583 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm

index 9f4f183..107fc35 100644 (file)
@@ -536,7 +536,7 @@ sub unapi {
         $lib_id = $lib_object->id;
 
         $ou_types = $actor->request( 'open-ils.actor.org_types.retrieve' )->gather(1);
-        $lib_depth = $depth || (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
+        $lib_depth = defined($depth) ? $depth : (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
     }
 
     if ($command eq 'browse') {