Index: openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql,v
diff -u -r1.33 -r1.33.2.1
--- openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql	7 Jul 2011 10:46:02 -0000	1.33
+++ openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql	17 Sep 2013 20:15:45 -0000	1.33.2.1
@@ -1157,6 +1157,10 @@
        PERFORM rel_segment__delete(row.segment_id);
    end loop;
 
+   --Lets clear the groups table first
+   delete from groups
+   where group_id = delete__group_id;
+
    PERFORM party__delete(delete__group_id);
 
    return 0; 
