From 8c62b77c5609b0bdd04c04ae8ddc46914fd7e351 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 22 Nov 2013 14:55:26 -0500 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 5b36425454..d0da2819c1 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -175,7 +175,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; } } -- 2.43.2