Index: openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-create.sql	24 Mar 2001 00:34:53 -0000	1.6
+++ openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-create.sql	17 Apr 2001 23:41:36 -0000	1.7
@@ -607,10 +607,8 @@
 from rel_constraints rc, rel_constraints rc_required 
 where rc.rel_segment in (select c2.rel_segment
                            from rel_constraints c1, rel_constraints c2
-                          where exists (select 1 
-                                          from rel_constraints
-                                         where rel_side = 'two'
-                                           and rel_segment = c2.required_rel_segment)
+                          where c2.rel_side = 'two'
+                            and c1.rel_side = 'two'
                             and c1.rel_segment = rc_required.rel_segment 
                             and c2.tree_sortkey <= c1.tree_sortkey
                             and c1.tree_sortkey like (c2.tree_sortkey || '%'));
