added some logs, notes
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 27 Jul 2006 21:28:52 +0000 (21:28 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 27 Jul 2006 21:28:52 +0000 (21:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5140 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 76f836c..892733c 100644 (file)
@@ -70,7 +70,7 @@ sub build_runner {
        my $runner = OpenILS::Utils::ScriptRunner->new;
 
        my $gt = $GROUP_TREE;
-       weaken($gt); # just to be safe
+       #weaken($gt); # just to be safe
        $runner->insert( "$evt.groupTree",      $gt, 1);
 
 
@@ -295,7 +295,8 @@ sub insert_org_methods {
                        my ($parent)    = grep { $_->shortname eq $sname } @ORG_LIST;
                        my ($child)             = grep { $_->id == $id } @ORG_LIST;
                        my $val = is_org_descendent( $parent, $child );
-                       $r->insert($write_key, $val, 1);
+                       $logger->debug("script_builder: is_org_desc returned val $val, writing to $write_key");
+                       $r->insert($write_key, $val, 1) if $val; # Needs testing, was dying before
                        return $val;
                }
        );
@@ -306,6 +307,7 @@ sub insert_org_methods {
 sub is_org_descendent {
        my( $parent, $child ) = @_;
        return 0 unless $parent and $child;
+       $logger->debug("script_builder: is_org_desc checking parent=".$parent->id.", child=".$child->id);
        do {
                return 1 if $parent->id == $child->id;
        } while( ($child) = grep { $_->id == $child->parent_ou } @ORG_LIST );