##parameters=key=None # $Id: getFacultiesVoc.py 3269 2008-03-04 10:59:18Z joachim $ """ Return the faculties as an vocabulary """ if key is None: res = context.portal_catalog.search({'meta_type': "Faculty"}) return [(d.getId,d.Title,) for d in res] res = context.portal_catalog.search({'meta_type': "Faculty", 'id': key}) if res: return [-1].Title raise KeyError