- Timestamp:
- 16 Mar 2008, 08:38:39 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_academics/getDepartmentsVoc.py
r3254 r3339 6 6 """ 7 7 if key is None: 8 res = context.portal_catalog.search({'meta_type': "Department"}) 8 res = context.portal_catalog.search({'meta_type': "Department"}) 9 9 return [(d.getId(),d.Title,) for d in res] 10 10 res = context.portal_catalog.search({'meta_type': "Department", 'id': key}) 11 11 if res: 12 return res[ -1].Title12 return res[0].Title 13 13 14 14 raise KeyError
Note: See TracChangeset for help on using the changeset viewer.