From: Bill Erickson Date: Fri, 22 Nov 2013 19:55:26 +0000 (-0500) Subject: LP#1254146 gracefully handle custom trees sans entries X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=01b315ca9c70c00c64622bfa0b00f31fc8984675;p=evergreen%2Fpines.git LP#1254146 gracefully handle custom trees sans entries 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 Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm index 142f5379b8..ce009dd4ca 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -183,7 +183,8 @@ sub init_ro_object_cache { } } - $cache{aouct_tree}{$ctx->{locale}} = $node_tree->org_unit; + $cache{aouct_tree}{$ctx->{locale}} = + $node_tree->org_unit if $node_tree; } }