Index: openacs-4/packages/ams/tcl/ams-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-procs-postgresql.xql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/ams/tcl/ams-procs-postgresql.xql 6 Oct 2005 22:24:41 -0000 1.13 +++ openacs-4/packages/ams/tcl/ams-procs-postgresql.xql 28 Oct 2005 21:02:46 -0000 1.14 @@ -125,17 +125,30 @@ - select alam.attribute_id, - alam.required_p, - alam.section_heading, - aa.attribute_name, - aa.pretty_name, - aa.widget - from ams_list_attribute_map alam, - ams_attributes aa - where alam.attribute_id = aa.attribute_id - and alam.list_id = :list_id - order by alam.sort_order + select + distinct + attribute_id, + required_p, + section_heading, + attribute_name, + pretty_name, + widget + from ( + select + alam.attribute_id, + alam.required_p, + alam.section_heading, + aa.attribute_name, + aa.pretty_name, + aa.widget + from + ams_list_attribute_map alam, + ams_attributes aa + where + alam.attribute_id = aa.attribute_id + and alam.list_id in ($list_ids) + order by alam.sort_order + ) attributes