sanity check to prevent warnings
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Aug 2006 14:01:55 +0000 (14:01 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Aug 2006 14:01:55 +0000 (14:01 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5325 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/ScriptBuilder.pm

index 38ceb46..f1bcdd9 100644 (file)
@@ -309,6 +309,7 @@ sub is_org_descendent {
        return 0 unless $parent and $child;
        $logger->debug("script_builder: is_org_desc checking parent=".$parent->id.", child=".$child->id);
        do {
+               return 0 unless defined $child->parent_ou;
                return 1 if $parent->id == $child->id;
        } while( ($child) = grep { $_->id == $child->parent_ou } @ORG_LIST );
        return 0;