From: Bill Erickson Date: Tue, 29 May 2012 16:05:16 +0000 (-0400) Subject: tpac/kpac : search_filter_group cache repairs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a47189f0438790229306a4291010d6edff096235;p=evergreen%2Fpines.git tpac/kpac : search_filter_group cache repairs Repaired bug in search_filter_group which lead to empty results delivered when data was in the cache. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- 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 166875c631..f94d60b369 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -523,7 +523,7 @@ sub load_search_filter_groups { for my $org_id (@$org_list) { my $grps; - if (!$cache{search_filter_groups}{$org_id}) { + if (! ($grps = $cache{search_filter_groups}{$org_id}) ) { $grps = $self->editor->search_actor_search_filter_group([ {owner => $org_id}, { flesh => 2, @@ -535,7 +535,7 @@ sub load_search_filter_groups { ]); $cache{search_filter_groups}{$org_id} = $grps; } - + # for the current context, if a descendant org has a group # with a matching code replace the group from the parent. $seen{$_->code} = $_ for @$grps;