Avoid references to custom tree entries when no tree entries for a
custom tree exist. Prevents:
egweb: template error: undef error - Can't call method "org_unit" on an
undefined value at
/usr/local/share/perl/5.10.1/OpenILS/WWW/EGCatLoader/Util.pm line 185.\n
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
}
}
- $cache{aouct_tree}{$ctx->{locale}} = $node_tree->org_unit;
+ $cache{aouct_tree}{$ctx->{locale}} =
+ $node_tree->org_unit if $node_tree;
}
}