Index: openacs-4/packages/ams/tcl/ams-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-procs.tcl,v diff -u -r1.33 -r1.34 --- openacs-4/packages/ams/tcl/ams-procs.tcl 1 Dec 2005 11:01:07 -0000 1.33 +++ openacs-4/packages/ams/tcl/ams-procs.tcl 15 Dec 2005 22:50:16 -0000 1.34 @@ -370,9 +370,14 @@ # Control list to know which attributes are already in the # elements list so we don't en up with duplicates set control_list [list] + + # If we do not have a list_id then don't bother to try and get any attributes... + if {[string eq "" $list_ids]} { + set all_attributes [list] + } else { + set all_attributes [db_list_of_lists select_elements " "] + } - set all_attributes [db_list_of_lists select_elements " "] - foreach attribute $all_attributes { set attribute_id [lindex $attribute 0] if { [string equal [lsearch $control_list $attribute_id] "-1"] } {