Changeset 3494 for WAeUP_SRP/base/skins
- Timestamp:
- 8 May 2008, 09:35:54 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_academics/getCertificatesVoc.py
r3339 r3494 5 5 6 6 """ 7 # if key is None: 8 # res = context.portal_catalog.search({'meta_type': "Certificate"}) 9 # return [(d.getId,d.Title,) for d in res] 10 # res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key}) 11 # if res: 12 # return res[0].Title 7 13 if key is None: 8 res = context. portal_catalog.search({'meta_type': "Certificate"})9 return [(d. getId,d.Title,) for d in res]10 res = context. portal_catalog.search({'meta_type': "Certificate", 'id': key})14 res = context.certificates_catalog() 15 return [(d.code,d.title,) for d in res] 16 res = context.certificates_catalog(code=key) 11 17 if res: 12 return res[0]. Title18 return res[0].title 13 19 raise KeyError
Note: See TracChangeset for help on using the changeset viewer.