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:49:09 +0000 (19:49 +0000)
committerdbwells <dbwells@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Mar 2011 19:49:09 +0000 (19:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19585 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 19c5b75..0ccdc8b 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') {