Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.103 -r1.104 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 16 Apr 2002 13:53:52 -0000 1.103 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 17 Apr 2002 00:04:44 -0000 1.104 @@ -674,13 +674,21 @@ ns_set put $extra_vars community_id $community_id # Set up the relationship - set rel_id [relation_add \ + if {[catch {set rel_id [relation_add \ -member_state "needs approval" \ -extra_vars $extra_vars \ $rel_type \ $community_id \ $user_id \ - ] + ]} errmsg]} { + set savedInfo $errorInfo + + if {[string match -nocase {acs_object_rels_un} $errmsg]} { + return + } else { + error $errmsg $savedInfo + } + } if {[string equal $member_state "approved"] == 1} { membership_approve -user_id $user_id -community_id $community_id