##parameters=key=None # $Id: getCertificatesVoc.py 3339 2008-03-16 08:38:39Z henrik $ """ Return the faculties as an vocabulary """ if key is None: res = context.portal_catalog.search({'meta_type': "Certificate"}) return [(d.getId,d.Title,) for d in res] res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key}) if res: return res[0].Title raise KeyError