Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql,v
diff -u -r1.45 -r1.46
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql	11 Dec 2003 21:39:52 -0000	1.45
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql	6 Jan 2004 15:54:28 -0000	1.46
@@ -684,7 +684,9 @@
   delete from acs_attribute_values where object_id = delete__object_id;
 
   -- Delete direct permissions records.
-  delete from acs_permissions where object_id = delete__object_id;
+  delete from acs_permissions 
+  where object_id = delete__object_id
+    or  grantee_id = delete__object_id;
 
   -- select table_name, id_column
   --  from acs_object_types
