From dcbd9867c7f2c786303bb8b216b639d4933997fd Mon Sep 17 00:00:00 2001 From: scottmk Date: Wed, 15 Jul 2009 17:04:42 +0000 Subject: [PATCH] In actor.usr_delete(): correct the mistreatment of the profile column. It points to permission.grp_tree, not to actor.org_unit. git-svn-id: svn://svn.open-ils.org/ILS/trunk@13605 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/999.functions.global.sql | 31 ++++++++++++---------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/Open-ILS/src/sql/Pg/999.functions.global.sql b/Open-ILS/src/sql/Pg/999.functions.global.sql index 4a39393a04..fd1937a9dc 100644 --- a/Open-ILS/src/sql/Pg/999.functions.global.sql +++ b/Open-ILS/src/sql/Pg/999.functions.global.sql @@ -724,32 +724,27 @@ BEGIN -- perform actor.usr_purge_data( src_usr, dest_usr ); -- - -- Find the root org_unit(s). This would be simpler if we could assume - -- that there is only one root. Theoretically, someday, maybe, there - -- could be multiple roots, so we go to some extra trouble to get - -- the right ones. + -- Find the root grp_tree and the root org_unit. This would be simpler if we + -- could assume that there is only one root. Theoretically, someday, maybe, + -- there could be multiple roots, so we take extra trouble to get the right ones. -- SELECT id INTO new_profile FROM - actor.org_unit_ancestors( old_profile ) + permission.grp_ancestors( old_profile ) WHERE - parent_ou is null; + parent is null; -- - IF old_home_ou = old_profile THEN - new_home_ou := new_profile; - ELSE - SELECT - id - INTO - new_home_ou - FROM - actor.org_unit_ancestors( old_home_ou ) - WHERE - parent_ou is null; - END IF; + SELECT + id + INTO + new_home_ou + FROM + actor.org_unit_ancestors( old_home_ou ) + WHERE + parent_ou is null; -- -- Truncate date of birth -- -- 2.11.0