and imagine that, the ou passed to actor.org_unit_descendants(INT) might also be...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Jun 2010 15:12:58 +0000 (15:12 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Jun 2010 15:12:58 +0000 (15:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16805 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/pgmemcache-ou_tree_traversal_cache.sql

index 5f70e37..53eea2e 100644 (file)
@@ -57,6 +57,10 @@ DECLARE
     cached_value    RECORD;
 BEGIN
 
+    IF org IS NULL THEN
+        RETURN;
+    END IF;
+
     IF permission.mc_init() THEN
         -- RAISE NOTICE 'Getting perm from cache';
         EXECUTE $$SELECT memcache_get('oils_orgcache_$$ || org || $$') AS x;$$ INTO cached_value;