##parameters=key=None # $Id: getCertificatesVoc.py 3254 2008-02-28 13:06:20Z joachim $ """ 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 [-1].Title raise KeyError